Skip to main content

CodeSignalContext

                            
                              
                                class 
                                CodeSignalContext
                                
                                  
                                    
                                      TOwner
                                    
                                  
                                
                                extends 
                                
                                  
                                    
                                      SignalContext
                                      
                                        
                                          
                                            PossibleCodeScope
                                          
                                          
                                            CodeScope
                                          
                                          
                                            TOwner
                                          
                                        
                                      
                                    
                                  
                                
                                implements 
                                
                                  
                                    
                                      CodeSignalHelpers
                                      
                                        
                                          
                                            TOwner
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Type Parameters

Constructors

constructor

                            
                              
                                public 
                                override
                                new
                                CodeSignalContext
                                
                                  
                                    
                                      TOwner
                                    
                                  
                                
                                
                                  
                                    
                                      initial
                                      : 
                                      SignalValue
                                      
                                        
                                          
                                            PossibleCodeScope
                                          
                                        
                                      
                                    
                                    
                                      owner
                                      : 
                                      TOwner
                                    
                                    
                                      highlighter
                                      ?: 
                                      SignalValue
                                      
                                        
                                          
                                            
                                              
                                                
                                                  null
                                                
                                                
                                                  CodeHighlighter
                                                  
                                                    
                                                      
                                                        unknown
                                                      
                                                    
                                                  
                                                
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                
                                : 
                                CodeSignalContext
                                
                                  
                                    
                                      TOwner
                                    
                                  
                                
                              
                              

Type Parameters

Parameters

Overwrites SignalContext.constructor

Methods

append

                            
                              
                                public 
                                append
                                
                                  
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                  
                                
                                : 
                                TOwner
                              
                              
                            
                              
                                public 
                                append
                                
                                  
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              
                            
                              
                                public 
                                append
                                
                                  
                                    
                                      duration
                                      ?: 
                                      number
                                    
                                  
                                
                                : 
                                TagGenerator
                              
                              

Parameters


dispose

                            
                              
                                public 
                                dispose
                                (): 
                                void
                              
                              
Inherited from SignalContext.dispose

edit

                            
                              
                                public 
                                edit
                                
                                  
                                    
                                      duration
                                      : 
                                      number
                                       = 
                                      0.6
                                    
                                  
                                
                                : 
                                TagGenerator
                              
                              

Parameters


get

                            
                              
                                public 
                                get
                                (): 
                                CodeScope
                              
                              
Inherited from SignalContext.get

getInitial

                            
                              
                                public 
                                getInitial
                                (): 
                                
                                  
                                    
                                      undefined
                                    
                                    
                                      SignalValue
                                      
                                        
                                          
                                            PossibleCodeScope
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

Get the initial value of this signal.

Inherited from SignalContext.getInitial

getter

                            
                              
                                public 
                                getter
                                (): 
                                CodeScope
                              
                              
Inherited from SignalContext.getter

insert

                            
                              
                                public 
                                insert
                                
                                  
                                    
                                      point
                                      : 
                                      CodePoint
                                    
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                  
                                
                                : 
                                TOwner
                              
                              
                            
                              
                                public 
                                insert
                                
                                  
                                    
                                      point
                                      : 
                                      CodePoint
                                    
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              
                            
                              
                                public 
                                insert
                                
                                  
                                    
                                      point
                                      : 
                                      CodePoint
                                    
                                    
                                      duration
                                      ?: 
                                      number
                                    
                                  
                                
                                : 
                                TagGenerator
                              
                              

Parameters


isInitial

                            
                              
                                public 
                                isInitial
                                (): 
                                boolean
                              
                              

Check if the signal is currently using its initial value.

Examples

Inherited from SignalContext.isInitial

isTweening

                            
                              
                                public 
                                isTweening
                                (): 
                                boolean
                              
                              

Is the signal undergoing a tween?

Inherited from SignalContext.isTweening

parse

                            
                              
                                public 
                                override
                                parse
                                
                                  
                                    
                                      value
                                      : 
                                      PossibleCodeScope
                                    
                                  
                                
                                : 
                                CodeScope
                              
                              

Parameters

Overwrites SignalContext.parse

prepend

                            
                              
                                public 
                                prepend
                                
                                  
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                  
                                
                                : 
                                TOwner
                              
                              
                            
                              
                                public 
                                prepend
                                
                                  
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              
                            
                              
                                public 
                                prepend
                                
                                  
                                    
                                      duration
                                      ?: 
                                      number
                                    
                                  
                                
                                : 
                                TagGenerator
                              
                              

Parameters


raw

                            
                              
                                public 
                                raw
                                (): 
                                
                                  
                                    
                                      undefined
                                    
                                    
                                      SignalValue
                                      
                                        
                                          
                                            PossibleCodeScope
                                          
                                        
                                      
                                    
                                  
                                
                              
                              

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

Inherited from SignalContext.raw

remove

                            
                              
                                public 
                                remove
                                
                                  
                                    
                                      range
                                      : 
                                      CodeRange
                                    
                                  
                                
                                : 
                                TOwner
                              
                              
                            
                              
                                public 
                                remove
                                
                                  
                                    
                                      range
                                      : 
                                      CodeRange
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              

Parameters


replace

                            
                              
                                public 
                                replace
                                
                                  
                                    
                                      range
                                      : 
                                      CodeRange
                                    
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                  
                                
                                : 
                                TOwner
                              
                              
                            
                              
                                public 
                                replace
                                
                                  
                                    
                                      range
                                      : 
                                      CodeRange
                                    
                                    
                                      code
                                      : 
                                      CodeTag
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              
                            
                              
                                public 
                                replace
                                
                                  
                                    
                                      range
                                      : 
                                      CodeRange
                                    
                                    
                                      duration
                                      ?: 
                                      number
                                    
                                  
                                
                                : 
                                TagGenerator
                              
                              

Parameters


reset

                            
                              
                                public 
                                reset
                                (): 
                                TOwner
                              
                              

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

Examples

Inherited from SignalContext.reset

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

Inherited from SignalContext.save

set

                            
                              
                                public 
                                set
                                
                                  
                                    
                                      value
                                      : 
                                      
                                        
                                          
                                            typeof 
                                            DEFAULT
                                          
                                          
                                            SignalValue
                                            
                                              
                                                
                                                  PossibleCodeScope
                                                
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                
                                : 
                                TOwner
                              
                              

Parameters

Inherited from SignalContext.set

setter

                            
                              
                                public 
                                setter
                                
                                  
                                    
                                      value
                                      : 
                                      
                                        
                                          
                                            typeof 
                                            DEFAULT
                                          
                                          
                                            SignalValue
                                            
                                              
                                                
                                                  PossibleCodeScope
                                                
                                              
                                            
                                          
                                        
                                      
                                    
                                  
                                
                                : 
                                TOwner
                              
                              

Parameters

Inherited from SignalContext.setter

toPromise

                            
                              
                                public 
                                toPromise
                                (): 
                                Promise
                                
                                  
                                    
                                      CodeSignalContext
                                      
                                        
                                          
                                            TOwner
                                          
                                        
                                      
                                    
                                  
                                
                              
                              
Inherited from SignalContext.toPromise

toSignal

                            
                              
                                public 
                                override
                                toSignal
                                (): 
                                CodeSignal
                                
                                  
                                    
                                      TOwner
                                    
                                  
                                
                              
                              
Overwrites SignalContext.toSignal

tweener

                            
                              
                                public 
                                override
                                tweener
                                
                                  
                                    
                                      value
                                      : 
                                      SignalValue
                                      
                                        
                                          
                                            PossibleCodeScope
                                          
                                        
                                      
                                    
                                    
                                      duration
                                      : 
                                      number
                                    
                                    
                                      timingFunction
                                      : 
                                      TimingFunction
                                    
                                  
                                
                                : 
                                ThreadGenerator
                              
                              

Parameters

Overwrites SignalContext.tweener

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 SignalContext.collectPromise

consumePromises

                            
                              
                                static 
                                public 
                                consumePromises
                                (): 
                                Promise
                                
                                  
                                    
                                      PromiseHandle
                                      
                                        
                                          
                                            any
                                          
                                        
                                      
                                      []
                                    
                                  
                                
                              
                              
Inherited from SignalContext.consumePromises

hasPromises

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