From 8e2777565e34adc3429617b653fa44ec0eead217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Mon, 27 Mar 2023 13:48:54 +0300 Subject: [PATCH] Completed #3808 --- api-generator/build-apidoc.js | 9 ++++++--- layouts/doc/DocApiSection.vue | 6 ++++-- layouts/doc/DocApiTable.vue | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api-generator/build-apidoc.js b/api-generator/build-apidoc.js index 31fb725dd..0f5cfee7b 100644 --- a/api-generator/build-apidoc.js +++ b/api-generator/build-apidoc.js @@ -227,7 +227,8 @@ if (project) { }; }), returnType: signature.type.toString(), - description: signature.comment && signature.comment.summary.map((s) => parseText(s.text || '')).join(' ') + description: signature.comment && signature.comment.summary.map((s) => parseText(s.text || '')).join(' '), + deprecated: signature.comment && signature.comment.getTag('@deprecated') ? parseText(signature.comment.getTag('@deprecated').content[0].text) : undefined }); }); @@ -350,7 +351,8 @@ if (project) { readonly: prop.flags.isReadonly, type: prop.type.toString(), default: prop.comment && prop.comment.getTag('@defaultValue') ? prop.comment.getTag('@defaultValue').content[0].text : '', // TODO: Check - description: prop.comment && prop.comment.summary.map((s) => s.text || '').join(' ') + description: prop.comment && prop.comment.summary.map((s) => s.text || '').join(' '), + deprecated: prop.comment && prop.comment.getTag('@deprecated') ? parseText(prop.comment.getTag('@deprecated').content[0].text) : undefined }); }); @@ -395,7 +397,8 @@ if (project) { }; }), returnType: signature.type.toString(), - description: signature.comment && signature.comment.summary.map((s) => parseText(s.text || '')).join(' ') + description: signature.comment && signature.comment.summary.map((s) => parseText(s.text || '')).join(' '), + deprecated: signature.comment && signature.comment.getTag('@deprecated') ? parseText(signature.comment.getTag('@deprecated').content[0].text) : undefined }); }); } diff --git a/layouts/doc/DocApiSection.vue b/layouts/doc/DocApiSection.vue index 52ffbde50..c43698368 100644 --- a/layouts/doc/DocApiSection.vue +++ b/layouts/doc/DocApiSection.vue @@ -180,7 +180,8 @@ export default { type: emit.parameters[0]?.type }, returnType: emit.returnType, - description: emit.description + description: emit.description, + deprecated: emit.deprecated }); } @@ -194,7 +195,8 @@ export default { name: prop.name, type: prop.type, default: prop.default, - description: prop.description + description: prop.description, + deprecated: prop.deprecated }); } diff --git a/layouts/doc/DocApiTable.vue b/layouts/doc/DocApiTable.vue index 43d4c8c8f..5d7875f2c 100644 --- a/layouts/doc/DocApiTable.vue +++ b/layouts/doc/DocApiTable.vue @@ -21,7 +21,7 @@