Skip to content

Interface: Wand<C> ​

Defined in: core/types.ts:217

A wand that createWand makes.

Type Parameters ​

Type ParameterDefault type
Cunknown

Properties ​

PropertyModifierTypeDescriptionDefined in
readyreadonlyPromise<void>Resolves after all providers settle. It never rejects.core/types.ts:219
sectionsreadonlyreadonly Section<string, Schema>[]The configuration sections, with the theme section first.core/types.ts:221

Methods ​

destroy() ​

ts
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() ​

ts
exportConfig(): ConfigDocument;

Defined in: core/types.ts:231

Gives the merged configuration as a document.

Returns ​

ConfigDocument


getConfig() ​

ts
getConfig(): C;

Defined in: core/types.ts:223

Gives the merged configuration.

Returns ​

C


importConfig() ​

ts
importConfig(document): void;

Defined in: core/types.ts:233

Puts a document in the runtime layer.

Parameters ​

ParameterType
documentunknown

Returns ​

void


on() ​

ts
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 ​

ParameterType
typeK
handler(payload) => void

Returns ​

() => void


reset() ​

ts
reset(): void;

Defined in: core/types.ts:227

Removes the runtime layer and the saved difference of the target provider.

Returns ​

void


save() ​

ts
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 ​

ParameterType
options?SaveOptions

Returns ​

Promise<void>


setConfig() ​

ts
setConfig(patch): void;

Defined in: core/types.ts:225

Changes the runtime layer. Autosave then writes the difference.

Parameters ​

ParameterType
patchConfigPatch<C>

Returns ​

void


start() ​

ts
start(): void;

Defined in: core/types.ts:240

Starts the frame loop again after stop.

Returns ​

void


stop() ​

ts
stop(): void;

Defined in: core/types.ts:242

Stops the frame loop and clears the canvas.

Returns ​

void