We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 086725f commit 7fb0255Copy full SHA for 7fb0255
1 file changed
packages/deno/src/integrations/denoRuntimeMetrics.ts
@@ -100,9 +100,11 @@ export const denoRuntimeMetricsIntegration = defineIntegration((options: DenoRun
100
if (intervalId) {
101
clearInterval(intervalId);
102
}
103
- intervalId = setInterval(collectMetrics, collectionIntervalMs);
104
// In Deno, setInterval returns a number, so _INTERNAL_safeUnref is a no-op.
105
// Use Deno.unrefTimer so the interval doesn't prevent the process from exiting.
+ // Cast to number since the tsconfig.types.json build context resolves setInterval
106
+ // to Node's NodeJS.Timeout rather than the Deno/browser number type.
107
+ intervalId = setInterval(collectMetrics, collectionIntervalMs) as unknown as number;
108
Deno.unrefTimer(intervalId);
109
},
110
0 commit comments