Skip to content

Commit c1a07b7

Browse files
authored
fix(schedulers): no longer cause TypeScript build failures when Node types aren't included
The `TimerHandle` type references a type from `@types/node` but that package might not be available, using the return type of `setTimeout` achieves the same result but doesn't require `@types/node` to be installed.
1 parent 054c0d3 commit c1a07b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal/scheduler/timerHandle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type TimerHandle = number | NodeJS.Timeout;
1+
export type TimerHandle = number | ReturnType<typeof setTimeout>;

0 commit comments

Comments
 (0)