Here is an example that successfully works:
protected createGroups(sortedItems: Array<TbpeItem>): any[] {
let groups: any[] = [];
return groups;
}
However, the second example encounters a TypeScript error: type any[] not assignable to type []
protected createGroups(sortedItems: Array<TbpeItem>): [] {
let groups: any[] = [];
return groups;
}