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 87b3d13 commit 6aae28fCopy full SHA for 6aae28f
src/index.ts
@@ -371,14 +371,17 @@ const getNamedType = (opts: Options<NamedTypeNode | ObjectTypeDefinitionNode>):
371
)
372
break;
373
374
- return foundTypes
375
- .map((implementType: TypeItem) =>
376
- getNamedImplementType({
377
- ...opts,
378
- currentType: implementType.types,
379
- }),
380
- )
381
- .join(' || ');
+ return (
+ foundTypes
+ .map((implementType: TypeItem) =>
+ getNamedImplementType({
+ ...opts,
+ currentType: implementType.types,
+ }),
+ )
382
+ .filter((value) => value !== null)
383
+ .join(' || ') || null
384
+ );
385
default:
386
throw `foundType is unknown: ${foundType.name}: ${foundType.type}`;
387
}
0 commit comments