Skip to content

Function: createWand() ​

ts
function createWand<E, P>(options?): Wand<ComposeConfig<[...E[], ...P[]]>>;

Defined in: core/wand.ts:30

Creates a wand and starts it.

Type Parameters ​

Type ParameterDefault type
E extends readonly Effect<string, Schema>[]DefaultEffects
P extends readonly Plugin<string, Schema>[][]

Parameters ​

ParameterTypeDescription
options?CreateWandOptions<E, P>The effects, plugins, configuration, providers and target of the wand.

Returns ​

Wand<ComposeConfig<[...E[], ...P[]]>>

The wand. Its configuration type comes from the effects and the plugins.

Throws ​

If a different overlay wand exists.

Example ​

ts
const wand = createWand({ config: { chalk: { size: 20 } } });
wand.destroy();