31 lines
627 B
TypeScript
31 lines
627 B
TypeScript
// @declaration: true
|
|
export var simpleExample = class {
|
|
static getTags() { }
|
|
tags() { }
|
|
}
|
|
export var circularReference = class C {
|
|
static getTags(c: C): C { return c }
|
|
tags(c: C): C { return c }
|
|
}
|
|
|
|
// repro from #15066
|
|
export class FooItem {
|
|
foo(): void { }
|
|
name?: string;
|
|
}
|
|
|
|
export type Constructor<T> = new(...args: any[]) => T;
|
|
export function WithTags<T extends Constructor<FooItem>>(Base: T) {
|
|
return class extends Base {
|
|
static getTags(): void { }
|
|
tags(): void { }
|
|
}
|
|
}
|
|
|
|
export class Test extends WithTags(FooItem) {}
|
|
|
|
const test = new Test();
|
|
|
|
Test.getTags()
|
|
test.tags();
|