@@ -71,7 +71,7 @@ describe('$[client]', async () => {
7171
7272 it ( 'has correct return type' , ( ) => async ( ) => {
7373 const data = await $pets ( '/pet/{petId}' )
74- expectTypeOf ( data ) . toMatchTypeOf < ReturnData > ( )
74+ expectTypeOf ( data ) . toExtend < ReturnData > ( )
7575 } )
7676
7777 it ( 'returns correct type based on accept header' , ( ) => async ( ) => {
@@ -139,7 +139,7 @@ describe('use[Client]', async () => {
139139 immediate : false ,
140140 } )
141141
142- expectTypeOf ( data ) . toMatchTypeOf < Ref < ReturnData | undefined > > ( )
142+ expectTypeOf ( data ) . toExtend < Ref < ReturnData | undefined > > ( )
143143 } )
144144
145145 it ( 'has correct "transform" input parameter type' , ( ) => ( ) => {
@@ -162,9 +162,7 @@ describe('use[Client]', async () => {
162162 immediate : false ,
163163 } )
164164
165- expectTypeOf ( data ) . toMatchTypeOf < Ref < {
166- foo : string
167- } | undefined > > ( )
165+ expectTypeOf ( data ) . toExtend < Ref < { foo : string } | undefined > > ( )
168166 } )
169167
170168 it ( 'has correct reponse type using "default"' , ( ) => ( ) => {
@@ -176,9 +174,7 @@ describe('use[Client]', async () => {
176174 immediate : false ,
177175 } )
178176
179- expectTypeOf ( data ) . toMatchTypeOf < Ref < ReturnData | {
180- bar : number
181- } > > ( )
177+ expectTypeOf ( data ) . toExtend < Ref < ReturnData | { bar : number } > > ( )
182178 } )
183179
184180 it ( 'has correct response type using "default" and "transform"' , ( ) => ( ) => {
@@ -193,11 +189,7 @@ describe('use[Client]', async () => {
193189 immediate : false ,
194190 } )
195191
196- expectTypeOf ( data ) . toMatchTypeOf < Ref < {
197- foo : string
198- } | {
199- bar : number
200- } > > ( )
192+ expectTypeOf ( data ) . toExtend < Ref < { foo : string } | { bar : number } > > ( )
201193 } )
202194
203195 it ( 'has correct response type using "pick"' , ( ) => ( ) => {
@@ -207,9 +199,7 @@ describe('use[Client]', async () => {
207199 immediate : false ,
208200 } )
209201
210- expectTypeOf ( data ) . toMatchTypeOf < Ref < {
211- name : string
212- } | undefined > > ( )
202+ expectTypeOf ( data ) . toExtend < Ref < { name : string } | undefined > > ( )
213203 } )
214204
215205 it ( 'returns correct type based on accept header' , ( ) => ( ) => {
0 commit comments