'what is metadata in nestjs framework and when to use method @setmetadata?
Now I learning a course at the toppic reflection and metadata in the course and nest documentation they use @setmetadata('roles') but I don't know metadata come from and when there use ?
Solution 1:[1]
https://docs.nestjs.com/fundamentals/execution-context#reflection-and-metadata:
The
@SetMetadata()decorator is imported from the@nestjs/commonpackage.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Micael Levi |
