Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
typings: define types for timers binding
PR-URL: #40222
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
targos committed Oct 13, 2021
1 parent 65b51d0 commit c3a7a0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -7,6 +7,7 @@
"./typings/internalBinding/messaging.d.ts",
"./typings/internalBinding/options.d.ts",
"./typings/internalBinding/serdes.d.ts",
"./typings/internalBinding/timers.d.ts",
"./typings/internalBinding/util.d.ts",
"./typings/internalBinding/worker.d.ts",
"./typings/internalBinding.d.ts",
Expand Down
8 changes: 8 additions & 0 deletions typings/internalBinding/timers.d.ts
@@ -0,0 +1,8 @@
declare function InternalBinding(binding: 'timers'): {
getLibuvNow(): number;
setupTimers(immediateCallback: () => void, timersCallback: (now: number) => void): void;
scheduleTimer(msecs: number): void;
toggleTimerRef(value: boolean): void;
toggleImmediateRef(value: boolean): void;
immediateInfo: Uint32Array;
};

0 comments on commit c3a7a0b

Please sign in to comment.