aboutsummaryrefslogtreecommitdiff
path: root/scripts/apidocs/processing
diff options
context:
space:
mode:
authorShinigami <[email protected]>2025-06-17 21:30:05 +0200
committerGitHub <[email protected]>2025-06-17 21:30:05 +0200
commit04e8b7bab82069bf60961580e353e36096bc2120 (patch)
treec2889fd024c7d30e9af1211f2ae7736e28215e8a /scripts/apidocs/processing
parent1726ded4e61e9f7ce7b76a1759da820270a7a316 (diff)
downloadfaker-04e8b7bab82069bf60961580e353e36096bc2120.tar.xz
faker-04e8b7bab82069bf60961580e353e36096bc2120.zip
docs: add remarks about external sources (#3452)
Diffstat (limited to 'scripts/apidocs/processing')
-rw-r--r--scripts/apidocs/processing/jsdocs.ts4
-rw-r--r--scripts/apidocs/processing/signature.ts6
2 files changed, 10 insertions, 0 deletions
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,
@@ -39,6 +40,10 @@ export interface RawApiDocsSignature {
*/
parameters: RawApiDocsParameter[];
/**
+ * Additional comments of the signature that are supposed to stand out from the description.
+ */
+ remarks: string[];
+ /**
* The return type of the signature.
*/
returns: RawApiDocsType;
@@ -107,6 +112,7 @@ function processSignature(
description: getDescription(jsdocs),
since: getSince(jsdocs),
parameters,
+ remarks: getRemarks(jsdocs),
returns,
throws: getThrows(jsdocs),
signature: getSignatureText(signature),