Skip to content

Commit 37171bc

Browse files
committed
fix: widen reconnectTimer type for canary compatibility
Deno canary's TypeScript types now expose `setTimeout` as returning a `Timeout` object instead of `number`, which trips `TS2322` against the existing `let reconnectTimer: number` declaration. The variable is only passed back to `clearTimeout`, so widen it to the inferred return type. Fixes the canary CI failure on this branch (unchanged behavior).
1 parent 16a9e85 commit 37171bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/fresh/src/runtime/client/dev_hmr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { IS_BROWSER } from "../shared.ts";
33
let ws: WebSocket;
44
let revision = 0;
55

6-
let reconnectTimer: number;
6+
let reconnectTimer: ReturnType<typeof setTimeout>;
77
const backoff = [
88
// Wait 100ms initially, because we could also be
99
// disconnected because of a form submit.

0 commit comments

Comments
 (0)