Interface: RouteWatcherHandle
API / @xmachines/play-router / RouteWatcherHandle
Defined in: router-bridge-base.ts:72
The narrow interface of the TC39 Signal watcher. RouterBridgeBase uses it to
observe each change of actor.currentRoute.
The interface hides the complete Signal.subtle.Watcher surface. It exposes the
two operations that RouterBridgeBase needs:
watch(signal)— it arms the watcher on one signalunwatch()— it stops the watch and frees the resources
A framework adapter subclass touches this handle never. RouterBridgeBase makes
it and manages it internally.
Methods
unwatch()
unwatch(): void;Defined in: router-bridge-base.ts:76
Stops the observation and frees the watcher.
Returns
void
watch()
watch(signal): void;Defined in: router-bridge-base.ts:74
Arms the watcher on the given signal.
Parameters
| Parameter | Type |
|---|---|
signal | Computed<string | null> |
Returns
void