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

wrong Reflect method #55

Open
its-dibo opened this issue Jun 1, 2024 · 5 comments
Open

wrong Reflect method #55

its-dibo opened this issue Jun 1, 2024 · 5 comments

Comments

@its-dibo
Copy link

its-dibo commented Jun 1, 2024

in this line

      Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey);

Reflect doesn't have a static method called defineMetadata, it is defined by reflect-metadata which must be imported as a side effect like this:

import "reflect-metadata";

//Now we can use  Reflect.defineMetadata()

the file uses it doesn't import reflect-metadata though it is add to dependencies

@its-dibo its-dibo closed this as completed Jun 1, 2024
@its-dibo its-dibo reopened this Jun 1, 2024
@zaro
Copy link
Member

zaro commented Jun 5, 2024

@its-dibo How exactly does this occur?

@its-dibo
Copy link
Author

its-dibo commented Jun 6, 2024

How exactly does this occur?

I cant get your question, but I just noticed that you are using some reflect-metadata functionalities without importing it.

@zaro
Copy link
Member

zaro commented Jun 7, 2024

@its-dibo Ok, but what exactly is the problem?

The packages build fine, there are no Typescript errors, so what exactly are you reporting ?

@its-dibo
Copy link
Author

I think (but not sure), that is because tsconfig uses "target": "es2018",

@zaro
Copy link
Member

zaro commented Jun 12, 2024

@its-dibo Yes, and it builds fine. My question is what is the actual problem you are reporting ?

How can I reproduce the problem you are describing ?

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

2 participants