Skip to content

@waylis/core


@waylis/core / createStep

Function: createStep() ​

ts
function createStep<K, T>(step: SceneStep<K, T>): SceneStep<K, T>;

Defined in: scene/step.ts:77

Create a new scene step, validating its key format and length.

Type Parameters ​

K ​

K extends string

T ​

T extends UserMessageBodyType

Parameters ​

step ​

SceneStep<K, T>

Step configuration.

Returns ​

SceneStep<K, T>

The validated step.

Throws ​

If the step key is invalid.

Released under the MIT License.