I tried applying the @Reflect.metadata decorator to the TypeScript class, following the example 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 in the @Reflect.metadata line:
error TS1238: it is not possible to allow the signature of a class decorator when called as an expression.
Cannot invoke an expression whose type does not have a call signature.
What's wrong?
source share