File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/playwright-core/src/client Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -350,9 +350,9 @@ export class APIResponse implements api.APIResponse {
350350 return content . toString ( 'utf8' ) ;
351351 }
352352
353- async json < T = object > ( ) : Promise < T > {
353+ async json ( ) : Promise < object > {
354354 const content = await this . text ( ) ;
355- return JSON . parse ( content ) as T ;
355+ return JSON . parse ( content ) ;
356356 }
357357
358358 async [ Symbol . asyncDispose ] ( ) {
Original file line number Diff line number Diff line change @@ -718,9 +718,9 @@ export class Response extends ChannelOwner<channels.ResponseChannel> implements
718718 return content . toString ( 'utf8' ) ;
719719 }
720720
721- async json < T = object > ( ) : Promise < T > {
721+ async json ( ) : Promise < object > {
722722 const content = await this . text ( ) ;
723- return JSON . parse ( content ) as T ;
723+ return JSON . parse ( content ) ;
724724 }
725725
726726 request ( ) : Request {
You can’t perform that action at this time.
0 commit comments