gunshi / default / ValidationErrorsDecorator
Type Alias: ValidationErrorsDecorator()<G>
ts
type ValidationErrorsDecorator<G> = (baseRenderer, ctx, error) => Promise<string>;Validation errors renderer decorator type. A function that wraps a validation errors renderer to add or modify its behavior.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
G extends GunshiParamsConstraint | DefaultGunshiParams | A type extending GunshiParams to specify the shape of command context. |
Parameters
| Parameter | Type | Description |
|---|---|---|
baseRenderer | (ctx, error) => Promise<string> | The base validation errors renderer function to decorate |
ctx | Readonly<CommandContext<G>> | The command context |
error | AggregateError | The aggregate error containing validation errors |
Returns
Promise<string>
The decorated result
Since
v0.27.0
