From c1a07b71ac050ab36b371ff7f18dc9a924fffc9f Mon Sep 17 00:00:00 2001 From: Kristoffer K Date: Sat, 3 Dec 2022 20:35:12 +0100 Subject: [PATCH] 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. --- src/internal/scheduler/timerHandle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/scheduler/timerHandle.ts b/src/internal/scheduler/timerHandle.ts index 0b0416486c..99c00982df 100644 --- a/src/internal/scheduler/timerHandle.ts +++ b/src/internal/scheduler/timerHandle.ts @@ -1 +1 @@ -export type TimerHandle = number | NodeJS.Timeout; +export type TimerHandle = number | ReturnType;