TypeScript · Middle · Question 32 of 75

What are decorators in TypeScript 5?

Explanation

TS 5.0 supports standard (stage 3) decorators without a flag. The legacy "experimental" decorators (experimentalDecorators) with a different API are used in Angular, NestJS and TypeORM. Uses: logging, DI, validation, metadata.

Further reading

Problem with a question

TypeScript · Middle · question 32

Test yourself

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

Take this quiz