NestJS · Junior · Question 8 of 75

Why does Nest use decorators like @Controller() and @Injectable()?

Explanation

Nest uses TypeScript's decorator support (experimentalDecorators) and emitDecoratorMetadata, which records constructor parameter types for DI.

Further reading

Problem with a question

NestJS · Junior · question 8

Test yourself

Take the NestJS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz