TypeScript/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts
2017-05-22 14:57:56 -07:00

30 lines
623 B
TypeScript

// @declaration: true
export var noPrivates = class {
static getTags() { }
tags() { }
private static ps = -1
private p = 12
}
// altered repro from #15066 to add private property
export class FooItem {
foo(): void { }
name?: string;
private property = "capitalism"
}
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();