SignalContext
class SignalContextTSetterValueTValue extends TSetterValue = TSetterValueTOwner = void extends DependencyContextTOwner
Type Parameters
TSetterValue
TValue extends TSetterValue = TSetterValue
TOwner = void
Extended by
Constructors
constructor
public override new SignalContextTSetterValueTValue = TSetterValueTOwner = voidinitial: undefinedSignalValueTSetterValueinterpolation: InterpolationFunctionTValueany[]owner: TOwner = ...parser: value: TSetterValue => TValue = ...extensions: PartialSignalExtensionsTSetterValueTValue = {}: SignalContextTSetterValueTValueTOwner
Type Parameters
TSetterValue
TValue = TSetterValue
TOwner = void
Parameters
initial: undefinedSignalValueTSetterValue
interpolation: InterpolationFunctionTValueany[]
owner: TOwner = ...
parser: value: TSetterValue => TValue = ...
extensions: PartialSignalExtensionsTSetterValueTValue = {}
DependencyContext.constructor
Methods
dispose
public override dispose(): void
DependencyContext.dispose
get
public get(): TValue
getInitial
public getInitial(): undefinedSignalValueTSetterValue
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(): undefinedSignalValueTSetterValue
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: SignalValueTSetterValuetypeof DEFAULT: TOwner
Parameters
value: SignalValueTSetterValuetypeof DEFAULT
setter
public settervalue: SignalValueTSetterValuetypeof DEFAULT: TOwner
Parameters
value: SignalValueTSetterValuetypeof DEFAULT
toPromise
public toPromise(): PromiseSignalContextTSetterValueTValueTOwner
DependencyContext.toPromise
toSignal
public toSignal(): SignalTSetterValueTValueTOwnerSignalContextTSetterValueTValueTOwner
tweener
public tweenervalue: SignalValueTSetterValueduration: numbertimingFunction: TimingFunctioninterpolationFunction: InterpolationFunctionTValueany[]: ThreadGenerator
Parameters
value: SignalValueTSetterValue
duration: number
timingFunction: TimingFunction
interpolationFunction: InterpolationFunctionTValueany[]
collectPromise
static public collectPromiseTpromise: PromiseTinitialValue: T: PromiseHandleT
Type Parameters
Parameters
Inherited fromDependencyContext.collectPromise
consumePromises
static public consumePromises(): PromisePromiseHandleany[]
DependencyContext.consumePromises
hasPromises
static public hasPromises(): boolean
DependencyContext.hasPromises