SignalContext
class
SignalContext
TSetterValue
TValue
extends
TSetterValue
=
TSetterValue
TOwner
=
void
extends
DependencyContext
TOwner
Type Parameters
-
TSetterValue -
TValue extends TSetterValue = TSetterValue -
TOwner = void
Extended by
-
CompoundSignalContext
Constructors
constructor
public
override
new
SignalContext
TSetterValue
TValue
=
TSetterValue
TOwner
=
void
initial
:
undefined
SignalValue
TSetterValue
interpolation
:
InterpolationFunction
TValue
any
[]
owner
:
TOwner
=
...
parser
:
value
:
TSetterValue
=>
TValue
=
...
extensions
:
Partial
SignalExtensions
TSetterValue
TValue
=
{}
:
SignalContext
TSetterValue
TValue
TOwner
Type Parameters
-
TSetterValue -
TValue = TSetterValue -
TOwner = void
Parameters
-
initial : undefined SignalValue TSetterValue -
interpolation : InterpolationFunction TValue any [] -
owner : TOwner = ... -
parser : value : TSetterValue => TValue = ... -
extensions : Partial SignalExtensions TSetterValue TValue = {}
DependencyContext.constructor
Methods
dispose
public
override
dispose
():
void
DependencyContext.dispose
get
public
get
():
TValue
getInitial
public
getInitial
():
undefined
SignalValue
TSetterValue
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
parse
value
:
TSetterValue
:
TValue
Parameters
-
value : TSetterValue
raw
public
raw
():
undefined
SignalValue
TSetterValue
Get the raw value of this signal.
If the signal was provided with a factory function, the function itselfwill 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 itscurrent value.
Examples
set
public
set
value
:
typeof
DEFAULT
SignalValue
TSetterValue
:
TOwner
Parameters
-
value : typeof DEFAULT SignalValue TSetterValue
setter
public
setter
value
:
typeof
DEFAULT
SignalValue
TSetterValue
:
TOwner
Parameters
-
value : typeof DEFAULT SignalValue TSetterValue
toPromise
public
toPromise
():
Promise
SignalContext
TSetterValue
TValue
TOwner
DependencyContext.toPromise
toSignal
public
toSignal
():
Signal
TSetterValue
TValue
TOwner
SignalContext
TSetterValue
TValue
TOwner
tweener
public
tweener
value
:
SignalValue
TSetterValue
duration
:
number
timingFunction
:
TimingFunction
interpolationFunction
:
InterpolationFunction
TValue
any
[]
:
ThreadGenerator
Parameters
-
value : SignalValue TSetterValue -
duration : number -
timingFunction : TimingFunction -
interpolationFunction : InterpolationFunction TValue any []
collectPromise
static
public
collectPromise
T
promise
:
Promise
T
initialValue
:
T
:
PromiseHandle
T
Type Parameters
Parameters
Inherited from
DependencyContext.collectPromise
consumePromises
static
public
consumePromises
():
Promise
PromiseHandle
any
[]
DependencyContext.consumePromises
hasPromises
static
public
hasPromises
():
boolean
DependencyContext.hasPromises