Skip to content

Reflect.getMetadata #464

Closed
Closed

Description

@mbcooper

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!

Activity

  1. zloirock commented on Mar 23, 2016

    @zloirock

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

    core-js 2.1+ contains Reflect.getMetadata O_o

  2. PatrickJS commented on Mar 24, 2016

    @PatrickJS
    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!

  3. zloirock commented on Mar 24, 2016

    @zloirock

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

  4. mbcooper commented on Mar 24, 2016

    @mbcooper
    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

  5. zloirock commented on Mar 24, 2016

    @zloirock

    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.

  6. PatrickJS commented on Mar 24, 2016

    @PatrickJS
    Owner

    I'll reopen and fix the type definitions

  7. PatrickJS commented on Mar 30, 2016

    @PatrickJS
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions