Skip to main content

SignalContext

class SignalContextTSetterValueTValue extends TSetterValue = TSetterValueTOwner = void extends DependencyContextTOwner

Type Parameters

Extended by

  • CompoundSignalContext

Constructors​

constructor​

public override new SignalContextinitial: SignalValueTSetterValueundefinedinterpolation: InterpolationFunctionTValueowner: TOwner = ...parser: value: TSetterValue => TValue = ...extensions: PartialSignalExtensionsTSetterValueTValue = {}: SignalContextTSetterValueTValueTOwner

Parameters

Overwrites DependencyContext.constructor

Methods​

dispose​

public override dispose(): void
Overwrites DependencyContext.dispose

get​

public get(): TValue

getInitial​

public getInitial(): SignalValueTSetterValueundefined

Get the initial value of this signal.


getter​

public getter(): TValue

isInitial​

public isInitial(): boolean

Check if the signal is currently using its initial value.

Examples


isTweening​

public isTweening(): boolean

Is the signal undergoing a tween?


parse​

public parsevalue: TSetterValue: TValue

Parameters


raw​

public raw(): SignalValueTSetterValueundefined

Get the raw value of this signal.

If the signal was provided with a factory function, the function itself will be returned, without invoking it.

This method can be used to create copies of signals.

Examples


reset​

public reset(): TOwner

Reset the signal to its initial value (if one has been set).

Examples


save​

public save(): TOwner

Compute the current value of the signal and immediately set it.

This method can be used to stop the signal from updating while keeping its current value.

Examples


set​

public setvalue: typeof DEFAULTSignalValueTSetterValue: TOwner

Parameters

  • value: typeof DEFAULTSignalValueTSetterValue

setter​

public settervalue: typeof DEFAULTSignalValueTSetterValue: TOwner

Parameters

  • value: typeof DEFAULTSignalValueTSetterValue

toPromise​

public toPromise(): PromiseSignalContextTSetterValueTValueTOwner
Inherited from DependencyContext.toPromise

toSignal​

public toSignal(): SignalTSetterValueTValueTOwner

tweener​

public tweenervalue: SignalValueTSetterValueduration: numbertimingFunction: TimingFunctioninterpolationFunction: InterpolationFunctionTValue: ThreadGenerator

Parameters


collectPromise​

static public collectPromisepromise: PromiseT: PromiseHandleTnull
static public collectPromisepromise: PromiseTinitialValue: T: PromiseHandleT

Parameters

Inherited from DependencyContext.collectPromise

consumePromises​

static public consumePromises(): PromisePromiseHandleany[]
Inherited from DependencyContext.consumePromises

hasPromises​

static public hasPromises(): boolean
Inherited from DependencyContext.hasPromises