I am trying to use a decorator with an anonymous class (class expression) on TypeScript 1.8.9 and am receiving the error: "error TS1206: Decorators are not valid here."
const decorator: MethodDecorator = function (target: Object, propertyKey: string,
descriptor: TypedPropertyDescriptor<any>): TypedPropertyDescriptor<any> {
return descriptor;
};
const C = class {
@decorator method() {}
};
I didn't see anything addressing decorating anonymous classes in the roadmap, so I am filing this issue to either provide clarification to other people in my situation or to mark a bug.
I am trying to use a decorator with an anonymous class (class expression) on TypeScript 1.8.9 and am receiving the error: "error TS1206: Decorators are not valid here."
I didn't see anything addressing decorating anonymous classes in the roadmap, so I am filing this issue to either provide clarification to other people in my situation or to mark a bug.