Skip to content

feat: trigger signal#75

Closed
medz wants to merge 6 commits intostackblitz:masterfrom
medz:feat-trigger-signal
Closed

feat: trigger signal#75
medz wants to merge 6 commits intostackblitz:masterfrom
medz:feat-trigger-signal

Conversation

@medz
Copy link
Contributor

@medz medz commented Jul 4, 2025

Allows external users to manually trigger restarts of signal subscribers.

medz added 5 commits July 4, 2025 12:02
Introduces IS_SIGNAL and SIGNAL_TRIGGER symbols to identify and trigger signals. Adds triggerSignal function to programmatically trigger a signal's subscribers without changing its value. Updates signalOper to handle the trigger and marks signalOper with IS_SIGNAL for detection.
Introduces a mechanism to force trigger effects subscribed to a signal even when its value has not changed, via a new triggerSignal function. Updates the signal implementation to support a special trigger symbol and adds tests to verify forced effect execution.
@medz
Copy link
Contributor Author

medz commented Jul 4, 2025

Done. CC/ @johnsoncodehk

@johnsoncodehk
Copy link
Collaborator

Thanks for this PR, for your reference I have refactored the triggerSignal implementation in 9e0acbf. But we don't have plan to add more APIs to the default implementation, instead I think we can description how to implement such framework-specific functionality in document via create your own surface API.

@medz medz deleted the feat-trigger-signal branch July 4, 2025 21:00
@medz medz mentioned this pull request Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants