Skip to content

Add clock-less delay overload - #354

Merged
sergeysova merged 1 commit into
mainfrom
feat/clock-less-delay
Mar 19, 2026
Merged

Add clock-less delay overload#354
sergeysova merged 1 commit into
mainfrom
feat/clock-less-delay

Conversation

@sergeysova

@sergeysova sergeysova commented Mar 18, 2026

Copy link
Copy Markdown
Member

Add delay({ timeout, target }) which returns a unit suitable for sample target arrays. Covers typing, runtime behavior, fork scope, and documentation.

Closes #285


Note

Medium Risk
Adds a new runtime code path and TypeScript overloads for delay that change dispatch behavior when source is omitted; risk is moderate due to potential overload/behavioral edge cases, though covered by new tests and typings.

Overview
Adds a new delay({ timeout, target }) overload that creates and returns a trigger Event, which when called schedules the provided target unit(s) after the resolved timeout (number/store/function).

Updates delay’s implementation to branch when source is omitted, introduces a dedicated delayWithoutSource path, and adjusts typings/tests (including forked-scope behavior), plus documents the new overload in src/delay/readme.md.

Written by Cursor Bugbot for commit f125472. This will update automatically on new commits. Configure here.

Add delay({ timeout, target }) which returns a unit suitable for sample target arrays.
Covers typing, runtime behavior, fork scope, and documentation.
@sergeysova
sergeysova force-pushed the feat/clock-less-delay branch from 686cbc1 to f125472 Compare March 18, 2026 19:46

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment thread src/delay/index.ts
@sergeysova sergeysova self-assigned this Mar 19, 2026
@sergeysova sergeysova added the feature New functionality label Mar 19, 2026
@sergeysova
sergeysova merged commit 9d4c12c into main Mar 19, 2026
8 checks passed
@sergeysova
sergeysova deleted the feat/clock-less-delay branch March 19, 2026 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clock-less delay

1 participant