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

21 lines
477 B
TypeScript

// @target: esnext
// @noImplicitOverride: true
type Foo = abstract new(...args: any) => any;
declare function CreateMixin<C extends Foo, T extends Foo>(Context: C, Base: T): T & {
new (...args: any[]): { context: InstanceType<C> }
}
class Context {}
class A {
doSomething() {}
}
class B extends CreateMixin(Context, A) {
override foo() {} // Remove override
}
class C extends CreateMixin(Context, A) {
override doSomethang() {} // Suggestion 'doSomething'
}