Interface: Wand<C>
Defined in: core/types.ts:217
A wand that createWand makes.
Type Parameters
| Type Parameter | Default type |
|---|---|
C | unknown |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
ready | readonly | Promise<void> | Resolves after all providers settle. It never rejects. | core/types.ts:219 |
sections | readonly | readonly Section<string, Schema>[] | The configuration sections, with the theme section first. | core/types.ts:221 |
Methods
destroy()
destroy(): void;Defined in: core/types.ts:244
Removes the canvas, the listeners and the frame requests, and stops all requests of the providers.
Returns
void
exportConfig()
exportConfig(): ConfigDocument;Defined in: core/types.ts:231
Gives the merged configuration as a document.
Returns
getConfig()
getConfig(): C;Defined in: core/types.ts:223
Gives the merged configuration.
Returns
C
importConfig()
importConfig(document): void;Defined in: core/types.ts:233
Puts a document in the runtime layer.
Parameters
| Parameter | Type |
|---|---|
document | unknown |
Returns
void
on()
on<K>(type, handler): () => void;Defined in: core/types.ts:235
Adds an event handler. Returns a function that removes the handler.
Type Parameters
| Type Parameter |
|---|
K extends keyof WandLifecycleEvents<C> |
Parameters
| Parameter | Type |
|---|---|
type | K |
handler | (payload) => void |
Returns
() => void
reset()
reset(): void;Defined in: core/types.ts:227
Removes the runtime layer and the saved difference of the target provider.
Returns
void
save()
save(options?): Promise<void>;Defined in: core/types.ts:229
Saves the difference now, to the last writable provider or to the provider to.
Parameters
| Parameter | Type |
|---|---|
options? | SaveOptions |
Returns
Promise<void>
setConfig()
setConfig(patch): void;Defined in: core/types.ts:225
Changes the runtime layer. Autosave then writes the difference.
Parameters
| Parameter | Type |
|---|---|
patch | ConfigPatch<C> |
Returns
void
start()
start(): void;Defined in: core/types.ts:240
Starts the frame loop again after stop.
Returns
void
stop()
stop(): void;Defined in: core/types.ts:242
Stops the frame loop and clears the canvas.
Returns
void