TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

`ServiceWorkerRegistration.update()` should return `Promise<ServiceWorkerRegistration>`

Open jespertheend opened this issue 1 year ago • 0 comments

Currently it is defined in lib.dom.ts to return Promise<void>.

See the MDN page for update() which mentions:

Return value A Promise that resolves with a ServiceWorkerRegistration object.

The spec is a bit unclear because it mentions some job logic:

  1. Let job be the result of running Create Job with update

but in the end it seems like this promise is always resolved with a ServiceWorkerRegistration.

jespertheend avatar Feb 03 '24 13:02 jespertheend