aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/apidoc/signature.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts
index 109cd55d..c41b758c 100644
--- a/scripts/apidoc/signature.ts
+++ b/scripts/apidoc/signature.ts
@@ -304,7 +304,17 @@ function typeToText(type_?: Type, short = false): string {
case 'reference':
if (!type.typeArguments || !type.typeArguments.length) {
- return type.name;
+ const reflection = type.reflection as DeclarationReflection | undefined;
+ const reflectionType = reflection?.type;
+ if (
+ (reflectionType?.type === 'literal' ||
+ reflectionType?.type === 'union') &&
+ !type.name.match(/Char$/)
+ ) {
+ return typeToText(reflectionType, short);
+ } else {
+ return type.name;
+ }
} else if (type.name === 'LiteralUnion') {
return [
typeToText(type.typeArguments[0], short),