DeriveHandler
Command-scoped typed pre-action handler.
Derive handlers may:
- validate resolved input and throw CLIError
- return
undefinedto continue without changing context - return an object whose properties merge into
ctxdownstream
They cannot wrap downstream execution; use middleware for that.
- Import:
@kjanat/dreamcli - Export kind: type
- Declared in:
src/core/schema/command.ts - Source link:
packages/dreamcli/src/core/schema/command.ts:376
Signatures
ts
type DeriveHandler<F extends Record<string, FlagBuilder<FlagConfig>>, A extends Record<string, ArgBuilder<ArgConfig>>, C extends Record<string, unknown>, Output extends Record<string, unknown> | undefined> = { (params: DeriveParams<F, A, C>): Output | Promise<Output>; };