swc/crates/swc_ecma_parser/tests/tsc/staticMemberAssignsToConstructorFunctionMembers.ts

12 lines
230 B
TypeScript

class C {
static foo() {
C.foo = () => { }
}
static bar(x: number): number {
C.bar = () => { } // error
C.bar = (x) => x; // ok
C.bar = (x: number) => 1; // ok
return 1;
}
}