Skip to content
pixi-silk
GitHub repository
Interface

Computed

import type { Computed } from 'pixi-silk/signal';

A derived signal. dispose() stops it following its sources.

Extends#

Type Parameters#

Type Parameter
T

Properties#

PropertyModifierTypeDescriptionInherited fromDefined in
valuereadonlyTCurrent value.ReadSignal.valuesignal.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#

ParameterType
fnListener<T>

Returns#

() => void

Inherited from#

ReadSignal.subscribe