Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect.getMetadata #464

Closed
mbcooper opened this issue Mar 23, 2016 · 7 comments
Closed

Reflect.getMetadata #464

mbcooper opened this issue Mar 23, 2016 · 7 comments

Comments

@mbcooper
Copy link

I pulled the latest and am porting an app that we wrote with a version of the starter app in December. So much has changed!

The core.js defines a version of "Reflect" that does not have getMetadata.

How would I include that as an overload of the Reflect method? Everything seems so tightly wired!

@zloirock
Copy link

The core.js defines a version of "Reflect" that does not have getMetadata.

core-js 2.1+ contains Reflect.getMetadata O_o

@PatrickJS
Copy link
Owner

Thanks for creating the issue. the issue you're looking for is zloirock/core-js#152. Reflect does include getMetadata and I can understand the confusion you may have since it wasn't documented in the repo. I'm going to close this issue but if you like it would help everyone else if we updated the FAQ to mention this. If you could edit the readme to include this then that would be great. thanks!

@zloirock
Copy link

If you mean core-js repo, it's already documented here.

@mbcooper
Copy link
Author

I am still stuck. In the current polyfill.ts, we
import 'core-js';
which builds typings for the "old" Reflect definition.

The Reflect typing in typings/core-js/index.d.ts show Reflect without "getMetaData".

Do I have to add a specific import in polyfill, AND add a typing in typings.json?
I'm trying all sorts of ways to do this, and I cannot seem to get teh right definition of "Reflect" to my code.
@zloirock - I see it in your library, but my question is how to integrate it into the starter kit

@zloirock
Copy link

Looks like need update type definitions for core-js because all use definitions for 0.9.7 version - May 2015. I'm not an expert in TypeScript, so feel free add a PR. Or, I think, in addition, you can use definitions for reflect-metadata package.

@PatrickJS
Copy link
Owner

I'll reopen and fix the type definitions

@PatrickJS PatrickJS reopened this Mar 24, 2016
@PatrickJS
Copy link
Owner

thanks for the issue. fixed via 8205315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants