@jewel998/state-machine - v0.0.5 / ValidationContext
Class: ValidationContext<TConfig>
Context class for Strategy pattern
Type parameters
| Name |
|---|
TConfig |
Table of contents
Constructors
Methods
Constructors
constructor
• new ValidationContext<TConfig>(strategy): ValidationContext<TConfig>
Type parameters
| Name |
|---|
TConfig |
Parameters
| Name | Type |
|---|---|
strategy | IValidationStrategy<TConfig> |
Returns
ValidationContext<TConfig>
Defined in
Methods
setStrategy
▸ setStrategy(strategy): void
Parameters
| Name | Type |
|---|---|
strategy | IValidationStrategy<TConfig> |
Returns
void
Defined in
validate
▸ validate(config): ValidationResult
Parameters
| Name | Type |
|---|---|
config | TConfig |