We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 776dd0b commit edca0aaCopy full SHA for edca0aa
src/generators/jsx-ast/utils/buildSignature.mjs
@@ -23,7 +23,11 @@ export const generateSignature = (
23
}
24
25
// Function or method
26
- const returnStr = returnType ? `: ${returnType.type}` : '';
+ const returnStr = (returnType ? `: ${returnType.type}` : '')
27
+ .split('|')
28
+ .map(part => part.trim())
29
+ .filter(Boolean)
30
+ .join(' | ');
31
32
const paramsStr = params
33
.map(param => {
0 commit comments