Skip to main content

SignalContext

                            
                              
                                class 
                                SignalContext
                                
                                  
                                    
                                      TSetterValue
                                    
                                    
                                      TValue
                                       extends 
                                      TSetterValue
                                       = 
                                      TSetterValue
                                    
                                    
                                      TOwner
                                       = 
                                      void
                                    
                                  
                                
                                extends 
                                
                                  
                                    
                                      DependencyContext
                                      
                                        
                                          
                                            TOwner
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Type Parameters

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

Parameters

Overwrites DependencyContext.constructor

Methods

dispose

                            
                              
                                public 
                                override
                                dispose
                                (): 
                                void
                              
                              
Overwrites 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


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


setter

                            
                              
                                public 
                                setter
                                
                                  
                                    
                                      value
                                      : 
                                      
                                        
                                          
                                            typeof 
                                            DEFAULT
                                          
                                          
                                            SignalValue
                                            
                                              
                                                
                                                  TSetterValue
                                                
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                
                                : 
                                TOwner
                              
                              

Parameters


toPromise

                            
                              
                                public 
                                toPromise
                                (): 
                                Promise
                                
                                  
                                    
                                      SignalContext
                                      
                                        
                                          
                                            TSetterValue
                                          
                                          
                                            TValue
                                          
                                          
                                            TOwner
                                          
                                        
                                      
                                    
                                  
                                
                              
                              
Inherited from 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


collectPromise

                            
                              
                                static 
                                public 
                                collectPromise
                                
                                  
                                    
                                      T
                                    
                                  
                                
                                
                                  
                                    
                                      promise
                                      : 
                                      Promise
                                      
                                        
                                          
                                            T
                                          
                                        
                                      
                                    
                                  
                                
                                : 
                                PromiseHandle
                                
                                  
                                    
                                      
                                        
                                          
                                            null
                                          
                                          
                                            T
                                          
                                        
                                      
                                    
                                  
                                
                              
                              
                            
                              
                                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
                                          
                                        
                                      
                                      []
                                    
                                  
                                
                              
                              
Inherited from DependencyContext.consumePromises

hasPromises

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