Definitions
Definitions can be used to simplify common patterns.
Basic Syntax
A definition can be used to type specific data patterns.
def Wait(duration: int) -> dict:
type: 0;
duration: duration;
Calling this definition places the resulting data where the call occurs.
| SillyScript | JSON |
|---|---|
|
The SillyScript definition call:
|
The equivalent JSON:
|
Arguments
Definition arguments are provided as a list of NAME: TYPE combinations. See Types for more information on types.
Named Arguments
Arguments can also be passed by name. This allows only certain arguments to be used.
For example:
| SillyScript | JSON |
|---|---|
|
The SillyScript definition call:
|
The equivalent JSON:
|