I tried to apply the @Reflect.metadata
decorator to a TypeScript class, following the example on lines 82-84 of reflect-metadata.d.ts:
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts"/>
@Reflect.metadata('key', 0)
class C {
}
However, the TypeScript 1.7.2 compiler generates the following error on the @Reflect.metadata
line:
error TS1238: Unable to resolve signature of class decorator when called as an expression.
Cannot invoke an expression whose type lacks a call signature.
What's wrong?