mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
12 lines
230 B
TypeScript
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;
|
|
}
|
|
} |