mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Merge pull request #12962 from NYPL-Simplified/service_worker_api_cache_add_all
service_worker_api: Fixed cache.addAll argument.
This commit is contained in:
Vendored
+1
-1
@@ -305,7 +305,7 @@ interface Cache {
|
||||
*
|
||||
* @param request An array of Request objects you want to add to the cache.
|
||||
*/
|
||||
addAll(...request: Array<Request | string>): Promise<void>;
|
||||
addAll(requests: Array<Request | string>): Promise<void>;
|
||||
|
||||
/**
|
||||
* Adds additional key/value pairs to the current Cache object.
|
||||
|
||||
@@ -35,7 +35,7 @@ self.addEventListener('install', function(event: InstallEvent) {
|
||||
self.addEventListener('install', function(event: InstallEvent) {
|
||||
event.waitUntil(
|
||||
self.caches.open('v1').then(function(cache) {
|
||||
return cache.addAll(
|
||||
return cache.addAll([
|
||||
'/sw-test/',
|
||||
'/sw-test/index.html',
|
||||
'/sw-test/style.css',
|
||||
@@ -46,7 +46,7 @@ self.addEventListener('install', function(event: InstallEvent) {
|
||||
'/sw-test/gallery/bountyHunters.jpg',
|
||||
'/sw-test/gallery/myLittleVader.jpg',
|
||||
'/sw-test/gallery/snowTroopers.jpg'
|
||||
);
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user