aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-03-17 00:01:06 +0100
committerGitHub <[email protected]>2023-03-16 23:01:06 +0000
commit8cc47e6774cdb9caa36a92ffef4d70b83a44f37d (patch)
treefd4f12dd5edb26ca36dadb70ea834822d5d6b928 /scripts
parent65e6b7f64e870906746f041bd0dc8ffd2f7f0ff7 (diff)
downloadfaker-8cc47e6774cdb9caa36a92ffef4d70b83a44f37d.tar.xz
faker-8cc47e6774cdb9caa36a92ffef4d70b83a44f37d.zip
docs: fix nested parameter defaults (#1931)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidoc/signature.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts
index 7403e492..7eb2e896 100644
--- a/scripts/apidoc/signature.ts
+++ b/scripts/apidoc/signature.ts
@@ -25,6 +25,7 @@ import {
extractSeeAlsos,
extractSince,
extractSourcePath,
+ joinTagContent,
joinTagParts,
} from './typedoc';
import { pathOutputDir } from './utils';
@@ -392,6 +393,11 @@ function extractDefaultFromComment(comment?: Comment): string | undefined {
return;
}
+ const defaultTag = comment.getTag('@default');
+ if (defaultTag) {
+ return joinTagContent(defaultTag).join().trim();
+ }
+
const summary = comment.summary;
const text = joinTagParts(summary).trim();
if (!text) {