File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ declare namespace LightMyRequest {
7979 trailers : { [ key : string ] : string }
8080 payload : string
8181 body : string
82- json : ( ) => object
82+ json : ( ) => any
8383 cookies : Array < object >
8484 }
8585
Original file line number Diff line number Diff line change @@ -75,3 +75,9 @@ expectType<Chain>(inject(dispatch))
7575expectType < Chain > ( inject ( dispatch , { method : 'get' , url : '/' } ) )
7676// @ts -ignore tsd supports top-level await, but normal ts does not so ignore
7777expectType < Response > ( await inject ( dispatch , { method : 'get' , url : '/' } ) )
78+
79+ type ParsedValue = { field : string }
80+ // @ts -ignore tsd supports top-level await, but normal ts does not so ignore
81+ const response : Response = await inject ( dispatch )
82+ const parsedValue : ParsedValue = response . json ( )
83+ expectType < ParsedValue > ( parsedValue )
You can’t perform that action at this time.
0 commit comments