File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ export function schemaToType(
196196 types [ 0 ] ,
197197 ! options . disallowUndefined && hasQuestionToken ,
198198 ) ,
199+ docs,
199200 } ;
200201 }
201202
@@ -212,6 +213,7 @@ export function schemaToType(
212213 Writers . unionType ( ...types ) ,
213214 ! options . disallowUndefined && hasQuestionToken ,
214215 ) ,
216+ docs,
215217 } ;
216218 }
217219
@@ -227,6 +229,7 @@ export function schemaToType(
227229 Writers . unionType ( ...types , 'null' ) ,
228230 ! options . disallowUndefined && hasQuestionToken ,
229231 ) ,
232+ docs,
230233 } ;
231234 }
232235
@@ -267,14 +270,19 @@ export function schemaToType(
267270 return {
268271 name,
269272 hasQuestionToken,
273+ docs,
274+ } ;
270275
271276 type:
277+ docs ,
278+ } ;
272279 schemaObject . enum . length === 1
273280 ? JSON . stringify ( schemaObject . enum [ 0 ] )
274281 : Writers . unionType (
275282 // @ts -expect-error
276283 ...schemaObject . enum . map ( ( e ) => JSON . stringify ( e ) ) ,
277284 ) ,
285+ docs ,
278286 } ;
279287 }
280288
@@ -294,6 +302,7 @@ export function schemaToType(
294302 withNullUnion ( type , 'nullable' in schemaObject && schemaObject . nullable ) ,
295303 ! options . disallowUndefined && hasQuestionToken ,
296304 ) ,
305+ docs,
297306 } ;
298307}
299308
You can’t perform that action at this time.
0 commit comments