Skip to main content

@jewel998/state-machine - v0.0.5 / ConfigurationValidator

Class: ConfigurationValidator<TContext, TState, TEvent>

Strategy pattern for different validation and execution strategies

Type parameters

NameType
TContextextends ContextConstraint
TStateextends StateIdentifier
TEventextends EventIdentifier

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new ConfigurationValidator<TContext, TState, TEvent>(strategies?): ConfigurationValidator<TContext, TState, TEvent>

Type parameters

NameType
TContextextends ContextConstraint
TStateextends StateIdentifier
TEventextends EventIdentifier

Parameters

NameTypeDefault value
strategiesreadonly IValidationStrategy<StateMachineConfig<TContext, TState, TEvent>>[][]

Returns

ConfigurationValidator<TContext, TState, TEvent>

Defined in

src/validation/ConfigurationValidator.ts:31

Methods

validate

validate(config): ValidationResult

Parameters

NameType
configStateMachineConfig<TContext, TState, TEvent>

Returns

ValidationResult

Implementation of

IValidationStrategy.validate

Defined in

src/validation/ConfigurationValidator.ts:44