Summary
Follow-up for the granular node:timers parity work: the current timers suite covers the passing deterministic surface, but a few deeper Node parity gaps should be implemented before adding their corresponding fixtures.
Remaining gaps
-
Numeric timer clears
clearTimeout(+timeout) should clear a timeout handle by its primitive numeric id.
clearInterval(+interval) should clear an interval handle by its primitive numeric id.
- Related cross-clear shapes should also be validated once numeric clears work.
-
Timer callback this binding
- Node invokes
setTimeout / setInterval callbacks with this bound to the Timeout object.
- Perry currently executes timer callbacks without exposing that Timeout-shaped receiver.
-
Full node:timers import surface
- Add parity for namespace/default imports:
import * as timers from "node:timers"
import timers from "node:timers"
- prefixless
timers namespace/default imports
- Ensure function identity and callable namespace properties match Node where practical.
-
Deeper node:timers/promises semantics
setTimeout(ms, value) should resolve with value.
setImmediate(value) should resolve with value.
setInterval(ms, value) should behave as an async iterator yielding value.
- AbortSignal/options coverage should be added after the value and iterator paths are stable.
Acceptance criteria
- Add focused TypeScript fixtures under
test-parity/node-suite/timers for each fixed behavior.
- Keep
./run_parity_tests.sh --suite node-suite --module timers at 100% without adding new known_failures entries.
- Prefer small runtime fixes in the same PR as the fixtures when practical.
Summary
Follow-up for the granular
node:timersparity work: the current timers suite covers the passing deterministic surface, but a few deeper Node parity gaps should be implemented before adding their corresponding fixtures.Remaining gaps
Numeric timer clears
clearTimeout(+timeout)should clear a timeout handle by its primitive numeric id.clearInterval(+interval)should clear an interval handle by its primitive numeric id.Timer callback
thisbindingsetTimeout/setIntervalcallbacks withthisbound to theTimeoutobject.Full
node:timersimport surfaceimport * as timers from "node:timers"import timers from "node:timers"timersnamespace/default importsDeeper
node:timers/promisessemanticssetTimeout(ms, value)should resolve withvalue.setImmediate(value)should resolve withvalue.setInterval(ms, value)should behave as an async iterator yieldingvalue.Acceptance criteria
test-parity/node-suite/timersfor each fixed behavior../run_parity_tests.sh --suite node-suite --module timersat 100% without adding newknown_failuresentries.