denoland/celld

Public

setInterval is a global that throws when called

ST

celld 0.2.1, macOS arm64.

`typeof setInterval === 'function'` is `true` inside DO isolates, but **calling** it throws `Error: setInterval is not implemented in celld`. This is a worst-of-both stub shape: feature detection (`typeof` / `'setInterval' in globalThis`) says the API exists, so libraries and app code take the timer path and then explode at first use.

Two real breakages it caused in our Workers-targeted codebase (both inside a Durable Object request handler):

1. An SSE heartbeat `setInterval(...)` ran on first attach and the throw failed the entire request — the client got a 500-shaped body instead of a stream. 2. Anything else in the dependency graph that schedules with `setInterval` at module scope or first call.

**Ask:** either implement `setInterval` (even as a no-op-and-warn), or remove the global entirely so feature detection falls through to the no-timer branch. The throwing-stub middle ground makes the failure deferred and confusing.

  1. ryassigned bartlomieju3 months ago on GitHub

  2. steventsaoclosed3 months ago on GitHub

  3. bartlomiejureferenced 9c0ca09ef5d53 months ago on GitHub

  4. bartlomiejureferenced bc0e29cddf303 months ago on GitHub

  5. bartlomiejureferenced 89e4ffc53a143 months ago on GitHub

  6. ruqqqreferenced this in Move celld to v0.3.0: native cron and native D1, deleting three workarounds #622 months ago on GitHub