Skip to content

Commit

Permalink
Merge branch 'next' into 1441-add-global-locale
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Mar 29, 2023
2 parents 9177b99 + de47aaa commit 1eba502
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 39 deletions.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"glob": "~9.3.2",
"npm-run-all": "~4.1.5",
"picocolors": "~1.0.0",
"prettier": "2.8.4",
"prettier": "2.8.7",
"prettier-plugin-organize-imports": "~3.2.2",
"react": "~18.2.0",
"react-dom": "~18.2.0",
Expand Down
20 changes: 10 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion scripts/apidoc/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading

0 comments on commit 1eba502

Please sign in to comment.