gid-oss / dataui-nestjs-crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
125 stars 32 forks source link

wrong Reflect method #55

Open its-dibo opened 4 months ago

its-dibo commented 4 months ago

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

zaro commented 4 months ago

@its-dibo How exactly does this occur?

its-dibo commented 4 months ago

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 commented 4 months ago

@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 commented 4 months ago

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

zaro commented 4 months ago

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