@@ -781,13 +781,13 @@ declare var ByteLengthQueuingStrategy: {
781
781
* Available only in secure contexts.
782
782
*/
783
783
interface Cache {
784
- add ( request : RequestInfo ) : Promise < void > ;
784
+ add ( request : RequestInfo | URL ) : Promise < void > ;
785
785
addAll ( requests : RequestInfo [ ] ) : Promise < void > ;
786
- delete ( request : RequestInfo , options ?: CacheQueryOptions ) : Promise < boolean > ;
787
- keys ( request ?: RequestInfo , options ?: CacheQueryOptions ) : Promise < ReadonlyArray < Request > > ;
788
- match ( request : RequestInfo , options ?: CacheQueryOptions ) : Promise < Response | undefined > ;
789
- matchAll ( request ?: RequestInfo , options ?: CacheQueryOptions ) : Promise < ReadonlyArray < Response > > ;
790
- put ( request : RequestInfo , response : Response ) : Promise < void > ;
786
+ delete ( request : RequestInfo | URL , options ?: CacheQueryOptions ) : Promise < boolean > ;
787
+ keys ( request ?: RequestInfo | URL , options ?: CacheQueryOptions ) : Promise < ReadonlyArray < Request > > ;
788
+ match ( request : RequestInfo | URL , options ?: CacheQueryOptions ) : Promise < Response | undefined > ;
789
+ matchAll ( request ?: RequestInfo | URL , options ?: CacheQueryOptions ) : Promise < ReadonlyArray < Response > > ;
790
+ put ( request : RequestInfo | URL , response : Response ) : Promise < void > ;
791
791
}
792
792
793
793
declare var Cache : {
@@ -803,7 +803,7 @@ interface CacheStorage {
803
803
delete ( cacheName : string ) : Promise < boolean > ;
804
804
has ( cacheName : string ) : Promise < boolean > ;
805
805
keys ( ) : Promise < string [ ] > ;
806
- match ( request : RequestInfo , options ?: MultiCacheQueryOptions ) : Promise < Response | undefined > ;
806
+ match ( request : RequestInfo | URL , options ?: MultiCacheQueryOptions ) : Promise < Response | undefined > ;
807
807
open ( cacheName : string ) : Promise < Cache > ;
808
808
}
809
809
@@ -2652,7 +2652,7 @@ interface Request extends Body {
2652
2652
2653
2653
declare var Request : {
2654
2654
prototype : Request ;
2655
- new ( input : RequestInfo , init ?: RequestInit ) : Request ;
2655
+ new ( input : RequestInfo | URL , init ?: RequestInit ) : Request ;
2656
2656
} ;
2657
2657
2658
2658
/** This Fetch API interface represents the response to a request. */
@@ -5128,7 +5128,7 @@ interface WindowOrWorkerGlobalScope {
5128
5128
clearTimeout ( id ?: number ) : void ;
5129
5129
createImageBitmap ( image : ImageBitmapSource , options ?: ImageBitmapOptions ) : Promise < ImageBitmap > ;
5130
5130
createImageBitmap ( image : ImageBitmapSource , sx : number , sy : number , sw : number , sh : number , options ?: ImageBitmapOptions ) : Promise < ImageBitmap > ;
5131
- fetch ( input : RequestInfo , init ?: RequestInit ) : Promise < Response > ;
5131
+ fetch ( input : RequestInfo | URL , init ?: RequestInit ) : Promise < Response > ;
5132
5132
queueMicrotask ( callback : VoidFunction ) : void ;
5133
5133
reportError ( e : any ) : void ;
5134
5134
setInterval ( handler : TimerHandler , timeout ?: number , ...arguments : any [ ] ) : number ;
@@ -5498,7 +5498,7 @@ declare function clearInterval(id?: number): void;
5498
5498
declare function clearTimeout ( id ?: number ) : void ;
5499
5499
declare function createImageBitmap ( image : ImageBitmapSource , options ?: ImageBitmapOptions ) : Promise < ImageBitmap > ;
5500
5500
declare function createImageBitmap ( image : ImageBitmapSource , sx : number , sy : number , sw : number , sh : number , options ?: ImageBitmapOptions ) : Promise < ImageBitmap > ;
5501
- declare function fetch ( input : RequestInfo , init ?: RequestInit ) : Promise < Response > ;
5501
+ declare function fetch ( input : RequestInfo | URL , init ?: RequestInit ) : Promise < Response > ;
5502
5502
declare function queueMicrotask ( callback : VoidFunction ) : void ;
5503
5503
declare function reportError ( e : any ) : void ;
5504
5504
declare function setInterval ( handler : TimerHandler , timeout ?: number , ...arguments : any [ ] ) : number ;
0 commit comments