@@ -22,7 +22,7 @@ type Pet = components["schemas"]["Pet"];
2222type PetInvalid = ErrorResponseJSON < paths [ "/pet/{petId}" ] [ "get" ] > ;
2323type PetStatusInvalid = ErrorResponseJSON < paths [ "/pet/findByStatus" ] [ "get" ] > ;
2424expectTypeOf < Pet > ( ) . toMatchTypeOf < { name : string } > ( ) ;
25- expectTypeOf < PetInvalid > ( ) . toMatchTypeOf < { message : string } > ( ) ;
25+ expectTypeOf < PetInvalid > ( ) . toMatchTypeOf < { message : string } | undefined > ( ) ;
2626expectTypeOf < PetStatusInvalid > ( ) . toMatchTypeOf < { message : string } > ( ) ;
2727
2828// Set up hooks
@@ -383,7 +383,7 @@ describe("TypesForRequest", () => {
383383 it ( "returns correct error" , ( ) => {
384384 expectTypeOf < GetPet [ "Error" ] > ( ) . toEqualTypeOf < PetInvalid > ( ) ;
385385 expectTypeOf < FindPetsByStatus [ "Error" ] > ( ) . toEqualTypeOf < PetStatusInvalid > ( ) ;
386- expectTypeOf < FindPetsByTags [ "Error" ] > ( ) . toEqualTypeOf < never > ( ) ;
386+ expectTypeOf < FindPetsByTags [ "Error" ] > ( ) . toEqualTypeOf < undefined > ( ) ;
387387 } ) ;
388388
389389 it ( "returns correct path params" , ( ) => {
@@ -430,7 +430,7 @@ describe("TypesForRequest", () => {
430430 it ( "returns correct SWR config" , ( ) => {
431431 expectTypeOf < GetPet [ "SWRConfig" ] > ( ) . toEqualTypeOf < SWR . SWRConfiguration < Pet , PetInvalid > > ( ) ;
432432 expectTypeOf < FindPetsByStatus [ "SWRConfig" ] > ( ) . toEqualTypeOf < SWR . SWRConfiguration < Pet [ ] , PetStatusInvalid > > ( ) ;
433- expectTypeOf < FindPetsByTags [ "SWRConfig" ] > ( ) . toEqualTypeOf < SWR . SWRConfiguration < Pet [ ] , never > > ( ) ;
433+ expectTypeOf < FindPetsByTags [ "SWRConfig" ] > ( ) . toEqualTypeOf < SWR . SWRConfiguration < Pet [ ] , undefined > > ( ) ;
434434 } ) ;
435435
436436 it ( "returns correct SWR response" , ( ) => {
@@ -441,7 +441,7 @@ describe("TypesForRequest", () => {
441441 SWR . SWRResponse < Pet [ ] , PetStatusInvalid , SWR . SWRConfiguration < Pet [ ] , PetStatusInvalid > >
442442 > ( ) ;
443443 expectTypeOf < FindPetsByTags [ "SWRResponse" ] > ( ) . toEqualTypeOf <
444- SWR . SWRResponse < Pet [ ] , never , SWR . SWRConfiguration < Pet [ ] , never > >
444+ SWR . SWRResponse < Pet [ ] , undefined , SWR . SWRConfiguration < Pet [ ] , undefined > >
445445 > ( ) ;
446446 } ) ;
447447} ) ;
0 commit comments