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

use corejs Reflect metadata in typescript #982

Closed
2239559319 opened this issue Sep 6, 2021 · 4 comments
Closed

use corejs Reflect metadata in typescript #982

2239559319 opened this issue Sep 6, 2021 · 4 comments
Labels

Comments

@2239559319
Copy link

I try to use reflect metadata in ts and corejs as polyfill, but there will be a type error: "Property'defineMetadata' does not exist on type'typeof Reflect'". How should I solve this problem

@zloirock
Copy link
Owner

zloirock commented Sep 6, 2021

How do you use core-js?

@2239559319
Copy link
Author

How do you use core-js?

import 'core-js/proposals/reflect-metadata'; In the entry file

@zloirock
Copy link
Owner

zloirock commented Sep 6, 2021

core-js does not contain types definitions, #568, you could try to use something like https://www.npmjs.com/package/@types/core-js, however, it's outdated.

@2239559319
Copy link
Author

core-js does not contain types definitions, #568, you could try to use something like https://www.npmjs.com/package/@types/core-js, however, it's outdated.

I get it, the types file is for corejs2, thanks

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

No branches or pull requests

2 participants