Open
Description
class Foo {
static a = (): i32 => { // ERROR TS1110: Type expected.
return 1;
}
b = (): i32 => { // ERROR TS1110: Type expected.
return 2;
}
}
Instance method automatically lower it to simple FunctionDeclaration
due to class members are immutable in AS while class (static) function members can be reassigned so premature optimization is not possible.
Same for interfaces:
interface IFoo {
a: () => i32
}