PatrickJS / es7-reflect-metadata

Webpack and Universal support for reflect-metadata refactored by @gdi2290
Apache License 2.0
14 stars 2 forks source link

when getting metadata of a class, does it have to be an instance of a class or can it be the type #5

Open Vaevictus opened 7 years ago

Vaevictus commented 7 years ago

Hi - as title.

I have created a class decorator that defines if the class (which is a react screen) should show up in the main menu, and at what order etc.

I have the menu doing the reflection, and do not want to create instances of the screens to pass in. passing types fails..

Additionally, (and probably warrants its own separate thread), I dont like the pattern of explicity passing types/objects to my renderer component, and want that component instead to be able to scan for all classes that implement that metadata, but it doesnt seem possible without grouping all the possible classes into one file wrapped in a module directive.