Pending
The Pending class represents a pending state with removed, updated, and created states.
Constructors
new Pending(isDiffed)
new Pending(
isDiffed
):Pending
Constructs a new Pending object and resets its state.
Parameters
• isDiffed: boolean
= false
Returns
Source
Properties
created
created:
CreatedState
The created state.
Source
isDiffed
isDiffed:
boolean
Source
removed
removed:
RemovedState
The removed state.
Source
symbols
symbols: (
number
| [InputPayload
,number
])[]
Source
updated
updated:
UpdatedState
The updated state.
Source
Methods
actorInput()
actorInput(
id
,index
):void
Adds an actor input to the created inputs state.
Parameters
• id: string
The ID of the actor.
• index: number
The index of the new input.
Returns
void
Source
addSymbol()
addSymbol(
symbolTuple
):void
Adds a symbol tuple to the symbols array.
Parameters
• symbolTuple: any
The symbol tuple to add.
Returns
void
Source
changeComponent()
changeComponent(
pendingType
,id
,key
):void
Changes a component in the specified pending state.
Parameters
• pendingType: string
The type of the pending state (removed, updated, or created).
• id: string
The ID of the entity.
• key: string
The key of the component.
Returns
void
Source
createEntity()
createEntity(
id
):void
Marks an entity as created in the created state.
Parameters
• id: string
The ID of the entity to create.
Returns
void
Source
removeActor()
removeActor(
id
):void
Marks an actor as removed in the removed state.
Parameters
• id: string
The ID of the actor to remove.
Returns
void
Source
removeComponent()
removeComponent(
id
,key
):void
Marks a component as removed in the removed state.
Parameters
• id: string
The ID of the entity.
• key: string
The key of the component to remove.
Returns
void
Source
removeEntity()
removeEntity(
id
):void
Marks an entity as removed in the removed state.
Parameters
• id: string
The ID of the entity to remove.
Returns
void
Source
replaceSymbols()
replaceSymbols(
offset
,symbols
):void
Replaces the symbols array with a new array of symbol tuples.
Parameters
• offset: number
• symbols: any
[]
The new array of symbols.
Returns
void
Source
reset()
reset():
void
Resets the state of the Pending object.
Returns
void
Source
spawnActor()
spawnActor(
id
):void
Marks an actor as spawned in the created state.
Parameters
• id: string
The ID of the actor to spawn.
Returns
void
Source
upsertComponent()
upsertComponent(
pendingType
,id
,key
):void
Inserts or updates a component in the specified pending state.
Parameters
• pendingType: string
The type of the pending state (created or updated).
• id: string
The ID of the entity.
• key: string
The key of the component.
Returns
void
Source
Generated using typedoc-plugin-markdown and TypeDoc