@tsed/common
Version:
A TypeScript Framework on top of Express
43 lines (42 loc) • 851 B
TypeScript
/**
* Add description metadata on the decorated element.
*
* ::: warning
* This decorator will be removed in v7.
*
* For v5 user, use @@Description@@ from @tsed/common instead of @tsed/swagger.
*
* For v6 user, use @@Description@@ from @tsed/schema instead of @tsed/common.
* :::
*
* ## Example
*
* ```typescript
* class Model {
* @Description("description")
* id: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "id": {
* "type": "string",
* "description": "description"
* }
* }
* }
* ```
*
* @param {string} description
* @decorator
* @swagger
* @schema
* @ignore
* @deprecated Since v6. Use @Description decorator from @tsed/schema instead of.
*/
export declare function Description(description: string): (...args: any[]) => any;