swc/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.ts
2022-02-04 17:08:38 +09:00

20 lines
443 B
TypeScript

// @target: esnext
// @useDefineForClassFields: false
interface Mup<K, V> {
readonly size: number;
}
interface MupConstructor {
new(): Mup<any, any>;
new<K, V>(entries?: readonly (readonly [K, V])[] | null): Mup<K, V>;
readonly prototype: Mup<any, any>;
}
declare var Mup: MupConstructor;
class Sizz extends Mup {
// ok, because Mup is an interface
get size() { return 0 }
}
class Kasizz extends Mup {
size = -1
}