Skip to content

Commit 81b3f91

Browse files
committed
[INTERNAL] lib/processors/jsdoc: Simplify base type handling (fixup)
This change is a follow-up to the previous commit, which introduced a new, simplified way to handle base types in JSDoc. Cherry-picked from UI5/openui5@e419b0223.
1 parent 919eca8 commit 81b3f91

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/processors/jsdoc/lib/transformApiJson.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,17 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles,
136136
return true;
137137
}
138138

139-
// Handle array notation directly
140-
if (type.endsWith("[]")) {
141-
return builtInTypes.includes(type.slice(0, -2));
142-
}
143-
144139
// Check if the type is a union type
145140
if (type.includes("|")) {
146141
const unionParts = type.split("|").map(part => part.trim());
147142
return unionParts.every(part => isBuiltInType(part));
148143
}
149144

145+
// Handle array notation directly
146+
if (type.endsWith("[]")) {
147+
return builtInTypes.includes(type.slice(0, -2));
148+
}
149+
150150
// Predefined regex patterns for reuse
151151
const arrayRegex = /Array<(.+)>/;
152152
const arrayDotRegex = /Array\.<(.+)>/;

0 commit comments

Comments
 (0)