From 1a0f7cbeb7f64333aeabd2dab70b26d4541bab19 Mon Sep 17 00:00:00 2001 From: Jeffrey Posnick Date: Fri, 23 Oct 2020 10:10:41 -0400 Subject: [PATCH 1/2] Mark options param optional --- packages/workbox-background-sync/src/BackgroundSyncPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workbox-background-sync/src/BackgroundSyncPlugin.ts b/packages/workbox-background-sync/src/BackgroundSyncPlugin.ts index e4188634a..276f0f7c6 100644 --- a/packages/workbox-background-sync/src/BackgroundSyncPlugin.ts +++ b/packages/workbox-background-sync/src/BackgroundSyncPlugin.ts @@ -26,7 +26,7 @@ class BackgroundSyncPlugin implements WorkboxPlugin { * [Queue]{@link module:workbox-background-sync.Queue} documentation for * parameter details. */ - constructor(name: string, options: QueueOptions) { + constructor(name: string, options?: QueueOptions) { this._queue = new Queue(name, options); } From 85ffc58916641743a353b22e6c6b793c8b40131b Mon Sep 17 00:00:00 2001 From: Jeff Posnick Date: Fri, 23 Oct 2020 10:45:28 -0400 Subject: [PATCH 2/2] BroadcastUpdatePlugin options --- packages/workbox-broadcast-update/src/BroadcastCacheUpdate.ts | 2 +- .../workbox-broadcast-update/src/BroadcastUpdatePlugin.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/workbox-broadcast-update/src/BroadcastCacheUpdate.ts b/packages/workbox-broadcast-update/src/BroadcastCacheUpdate.ts index 47a76b0bb..d86850402 100644 --- a/packages/workbox-broadcast-update/src/BroadcastCacheUpdate.ts +++ b/packages/workbox-broadcast-update/src/BroadcastCacheUpdate.ts @@ -62,7 +62,7 @@ class BroadcastCacheUpdate { * Construct a BroadcastCacheUpdate instance with a specific `channelName` to * broadcast messages on * - * @param {Object} options + * @param {Object} [options] * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']] * A list of headers that will be used to determine whether the responses * differ. diff --git a/packages/workbox-broadcast-update/src/BroadcastUpdatePlugin.ts b/packages/workbox-broadcast-update/src/BroadcastUpdatePlugin.ts index a017e8860..c44c068cd 100644 --- a/packages/workbox-broadcast-update/src/BroadcastUpdatePlugin.ts +++ b/packages/workbox-broadcast-update/src/BroadcastUpdatePlugin.ts @@ -27,7 +27,7 @@ class BroadcastUpdatePlugin implements WorkboxPlugin { * calls its [`notifyIfUpdated()`]{@link module:workbox-broadcast-update.BroadcastCacheUpdate~notifyIfUpdated} * method whenever the plugin's `cacheDidUpdate` callback is invoked. * - * @param {Object} options + * @param {Object} [options] * @param {Array} [options.headersToCheck=['content-length', 'etag', 'last-modified']] * A list of headers that will be used to determine whether the responses * differ. @@ -35,7 +35,7 @@ class BroadcastUpdatePlugin implements WorkboxPlugin { * will be used as the `payload` field in any cache update messages sent * to the window clients. */ - constructor(options: BroadcastCacheUpdateOptions) { + constructor(options?: BroadcastCacheUpdateOptions) { this._broadcastUpdate = new BroadcastCacheUpdate(options); }