Questions tagged [reflect-metadata]

83 questions
1
vote
1 answer

Cannot Inject Dependency Into Derived Class

I have a relatively simple setup with three classes. I am using inversify for dependency injection. But when injecting the class MessageBroker into the derived class Repository the MessageBroker is undefined: import 'reflect-metadata'; import {…
1
vote
1 answer

Typescript decorator: get class decorator value from method decorator

I have a class decorator (fooAnnotation) and method decorator (barDecorator). import 'reflect-metadata'; function fooAnnotation(value: string){ console.log('fooAnnotation init...'); return (target: any): void => { console.log('fooAnnotation…
1
vote
0 answers

vue-property-decorator @Prop validator via reflect-metadata does not work after refreshing the page

Just as the title, @Prop validator via reflect-metadata does not work after refreshing the page. As the doc says, I import reflect-metadata and turn emitDecoratorMetadata to true. And my code is just like this: