Skip to content

Commit

Permalink
Update dom-screen-wake-lock for TS 5.1 (DefinitelyTyped#64671)
Browse files Browse the repository at this point in the history
Typescript 5.1's DOM types add the same types as dom-screen-wake-lock.
This PR updates the types to make them agree so that people can keep
installing (the latest version of) this package.

However, I don't think this package will actually be needed after 5.1,
because all of its types are now in the standard library.
  • Loading branch information
sandersn authored and Vicary A committed Jun 29, 2023
1 parent ea9dbed commit 50b9b19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions types/dom-screen-wake-lock/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// Project: https://w3c.github.io/screen-wake-lock/
// Definitions by: Chris Milson <https://github.com/chrismilson>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

type WakeLockType = 'screen';
// Minimum TypeScript Version: 5.1

/**
* A WakeLockSentinel provides a handle to a platform wake lock, and it holds on
Expand All @@ -25,7 +24,7 @@ interface WakeLockSentinel extends EventTarget {
* WakeLockSentinel's handle being released does not necessarily mean that
* the underlying wake lock has been released.
*/
onrelease: EventListener;
onrelease: ((this: WakeLockSentinel, ev: Event) => any) | null;
}

/**
Expand Down

0 comments on commit 50b9b19

Please sign in to comment.