Skip to content

Commit

Permalink
fix(schedulers): no longer cause TypeScript build failures when Node …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
merceyz authored Dec 3, 2022
1 parent 054c0d3 commit c1a07b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/scheduler/timerHandle.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type TimerHandle = number | NodeJS.Timeout;
export type TimerHandle = number | ReturnType<typeof setTimeout>;

0 comments on commit c1a07b7

Please sign in to comment.