TypeScript/tests/cases/compiler/metadataOfClassFromAlias.ts

18 lines
404 B
TypeScript

// @experimentalDecorators: true
// @emitDecoratorMetadata: true
// @target: es5
// @module: commonjs
// @filename: auxiliry.ts
export class SomeClass {
field: string;
}
//@filename: test.ts
import { SomeClass } from './auxiliry';
function annotation(): PropertyDecorator {
return (target: any): void => { };
}
export class ClassA {
@annotation() array: SomeClass | null;
}