Skip to content

Commit 29b8a7c

Browse files
committed
feat(typing): expose setTimeout/clearTimeout globally
1 parent 4643390 commit 29b8a7c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/pythonmonkey/global.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ declare var console: import("console").Console;
4848
declare var atob: typeof import("base64").atob;
4949
declare var btoa: typeof import("base64").btoa;
5050

51+
// Expose `setTimeout`/`clearTimeout` APIs
52+
declare var setTimeout: typeof import("timers").setTimeout;
53+
declare var clearTimeout: typeof import("timers").clearTimeout;
54+
5155
// Keep this in sync with both https://hg.mozilla.org/releases/mozilla-esr102/file/a03fde6/js/public/Promise.h#l331
5256
// and https://github.com/nodejs/node/blob/v20.2.0/deps/v8/include/v8-promise.h#L30
5357
declare enum PromiseState { Pending = 0, Fulfilled = 1, Rejected = 2 }

0 commit comments

Comments
 (0)