mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Fix incorrect onSync type
The type for onSync is incorrect. It should contain an argument containing the `queue` property.
From the documentation for `workbox-background-sync:4.3.0`:
```
* @param {Function} [options.onSync] A function that gets invoked whenever
* the 'sync' event fires. The function is invoked with an object
* containing the `queue` property (referencing this instance), and you
* can use the callback to customize the replay behavior of the queue.
* When not set the `replayRequests()` method is called.
* Note: if the replay fails after a sync event, make sure you throw an
* error, so the browser knows to retry the sync event later.
```
* Extract callback as a new type
Update definition in accordance to suggested changes by @JasonHK.
For consistency sake, this is identical to https://github.com/GoogleChrome/workbox/blob/master/packages/workbox-background-sync/src/Queue.ts.
* Fix test failures
* Update as per suggestions by @JasonHK
|
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| Plugin.d.ts | ||
| Queue.d.ts | ||
| tsconfig.json | ||
| tslint.json | ||
| workbox-background-sync-tests.ts | ||