Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property 'getMetadata' does not exist on type 'typeof Reflec

I want to use the Reflect to get a template of my component by I get this error

   console.log(Reflect.getMetadata('annotations',SectionsTemplateComponent)[0].template);

knowing that I have reflect-metadata in my packege json

thanks

like image 471
khalil _diouri Avatar asked Jul 11 '16 15:07

khalil _diouri


2 Answers

npm install reflect-metadata -D

import 'reflect-metadata'
like image 185
Sefa Baser Avatar answered Sep 28 '22 00:09

Sefa Baser


For me, adding import 'reflect-metadata' fixed the problem.

like image 39
shouhua Avatar answered Sep 28 '22 00:09

shouhua