| Standardization: | Extended | | Syntax kind: | Block tag |
ECMAScript decorators are sometimes an important part
of an API contract. However, today the TypeScript compiler does not represent decorators in the .d.ts output files
used by API consumers. The @decorator
tag provides a workaround, enabling a decorator expression to be quoted
in a doc comment.
class Book {
/**
* The title of the book.
* @decorator `@jsonSerialized`
* @decorator `@jsonFormat(JsonFormats.Url)`
*/
@jsonSerialized
@jsonFormat(JsonFormats.Url)
public website: string;
}
@decorator
tag for documenting ECMAScript decorators