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

21 lines
477 B
TypeScript
Raw Normal View History

// @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'
}