Skip to content

Commit c3a7a0b

Browse files
committed
typings: define types for timers binding
PR-URL: #40222 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: Zijian Liu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 65b51d0 commit c3a7a0b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"./typings/internalBinding/messaging.d.ts",
88
"./typings/internalBinding/options.d.ts",
99
"./typings/internalBinding/serdes.d.ts",
10+
"./typings/internalBinding/timers.d.ts",
1011
"./typings/internalBinding/util.d.ts",
1112
"./typings/internalBinding/worker.d.ts",
1213
"./typings/internalBinding.d.ts",

typings/internalBinding/timers.d.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
declare function InternalBinding(binding: 'timers'): {
2+
getLibuvNow(): number;
3+
setupTimers(immediateCallback: () => void, timersCallback: (now: number) => void): void;
4+
scheduleTimer(msecs: number): void;
5+
toggleTimerRef(value: boolean): void;
6+
toggleImmediateRef(value: boolean): void;
7+
immediateInfo: Uint32Array;
8+
};

0 commit comments

Comments
 (0)