Computed
import type { Computed } from 'pixi-silk/signal';
A derived signal. dispose() stops it following its sources.
Extends#
ReadSignal<T>
Type Parameters#
| Type Parameter |
|---|
T |
Properties#
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
value | readonly | T | Current value. | ReadSignal.value | signal.ts:14 |
Methods#
dispose()#
dispose(): void;
Unsubscribes from the sources. The value then stays as it is.
Returns#
void
subscribe()#
subscribe(fn: Listener<T>): () => void;
Calls fn on every change, not with the current value. Returns the unsubscribe function.
Parameters#
| Parameter | Type |
|---|---|
fn | Listener<T> |
Returns#
() => void