From 04e8b7bab82069bf60961580e353e36096bc2120 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Tue, 17 Jun 2025 21:30:05 +0200 Subject: docs: add remarks about external sources (#3452) --- scripts/apidocs/processing/jsdocs.ts | 4 ++++ scripts/apidocs/processing/signature.ts | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'scripts/apidocs/processing') diff --git a/scripts/apidocs/processing/jsdocs.ts b/scripts/apidocs/processing/jsdocs.ts index 41c1b84a..55dea867 100644 --- a/scripts/apidocs/processing/jsdocs.ts +++ b/scripts/apidocs/processing/jsdocs.ts @@ -69,6 +69,10 @@ export function getSeeAlsos(jsdocs: JSDoc): string[] { return getTagsFromJSDoc(jsdocs, 'see', true); } +export function getRemarks(jsdocs: JSDoc): string[] { + return getTagsFromJSDoc(jsdocs, 'remark'); +} + function getOptionalTagFromJSDoc( jsdocs: JSDoc, type: string diff --git a/scripts/apidocs/processing/signature.ts b/scripts/apidocs/processing/signature.ts index c7ae872b..8f6cedcb 100644 --- a/scripts/apidocs/processing/signature.ts +++ b/scripts/apidocs/processing/signature.ts @@ -8,6 +8,7 @@ import { getDescription, getExamples, getJsDocs, + getRemarks, getSeeAlsos, getSince, getThrows, @@ -38,6 +39,10 @@ export interface RawApiDocsSignature { * The parameters of the signature. */ parameters: RawApiDocsParameter[]; + /** + * Additional comments of the signature that are supposed to stand out from the description. + */ + remarks: string[]; /** * The return type of the signature. */ @@ -107,6 +112,7 @@ function processSignature( description: getDescription(jsdocs), since: getSince(jsdocs), parameters, + remarks: getRemarks(jsdocs), returns, throws: getThrows(jsdocs), signature: getSignatureText(signature), -- cgit v1.2.3