Optional varData: Readonly<{ The optional initial content of the variable.
Add a child variable with the specified name.
If there is an existing child variable with this name, it is erased.
The name of the variable to add
The variable to add as a child
The variable (for chaining calls)
Static copyGet the child with the specified name or at the specified index.
If the variable is an array, prefer getChildAt.
If the variable is a structure, prefer getChildNamed.
If the variable has not the specified child, an empty variable with the specified name (or index) is added as child.
The child variable
Static getReturn true if the variable is a number.
true if the variable is a number.
Use gdjs.Variable.getType instead.
Static isReturn true if the variable is a structure.
true if the variable is a structure.
Use gdjs.Variable.getType instead.
Pushes a copy of a variable into the array.
Optional varData: Readonly<{ Replaces all the children with a new map of children.
The map of new children.
Replaces all the children with a new array of children.
The array of new children.
Private concatenatePrivate getPrivate Get the value of the variable, as a number if it's one, or as a string (if it's a string or something else)
In most cases, prefer calling getAsNumber or getAsString directly.
This is a fallback in case a variable type can't be known statically for sure,
like getValue.
A Variable is an object storing a value (number or a string) or children variables.