Skip to content

Commit 62c592f

Browse files
committed
docs: comments
1 parent d5da06c commit 62c592f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/process-schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export function schemaToType(
118118

119119
const nullable = 'nullable' in schemaObject && schemaObject.nullable;
120120

121+
// not nullable, and only one type, so just return that type
121122
if (!nullable && types.length === 1 && types[0]) {
122123
return {
123124
name,
@@ -138,6 +139,8 @@ export function schemaToType(
138139
Writers.unionType(...types),
139140
};
140141
}
142+
143+
// add null
141144
return {
142145
name,
143146
hasQuestionToken,

0 commit comments

Comments
 (0)