You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, ExtendableEvent's waitUntil accepts any. A common mistake is to pass it a function, expecting the engine to call it. It doesn't, and will silently fail.
webworker lib Update Request
Missing / Incorrect Definition
Today,
ExtendableEvent
'swaitUntil
acceptsany
. A common mistake is to pass it a function, expecting the engine to call it. It doesn't, and will silently fail.This is defined here:
TypeScript/lib/lib.webworker.d.ts
Line 1542 in cec2fda
I would argue this needs to be typed as
Promise<any>
rather thanany
. This will catch two mistakes:waitUntil(longTask());
, withlongTask
a non-async function).Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil
The text was updated successfully, but these errors were encountered: