function foo(a: number, b: string): string {
return a + b;
}
whether I put this in TypeScript playground or VS Code gets a 1068: Unexpected token. A constructor, method, accessor, or property was expected.
Once I make that into a standard TS method signature (by removing the function keyword), everything is fine.
Yet the latest documentation on TypeScript:
https://www.typescriptlang.org/docs/handbook/functions.html
Shows function is totally usable. Very strange.

functionis not allowed. But that hold true for es2015 classes as well..