Noticed while resolving merge conflicts on PR #1933 ("refactor: widen outputResult signature, remove redundant casts at call sites").
Context: #1933 widens the real outputResult function (src/presentation/result-formatter.ts) from data: Record<string, any> to data: object. CommandContext.outputResult in src/types.ts (the DI-shape type used to pass outputResult into CLI commands) still types its data parameter as any, predating this PR — confirmed already present on #1933's own branch tip before any conflict resolution touched the file, so this isn't something the merge introduced.
Not a functional bug: an any-typed parameter is structurally compatible with any narrower type, so no type error results. Purely a documentation/consistency gap — the CommandContext interface's field type doesn't reflect the real function's now-narrower signature.
Fix: change outputResult: (data: any, key: string, opts: any) => boolean; to outputResult: (data: object, key: string, opts: any) => boolean; (or reuse whatever named parameter type the real function now uses) in src/types.ts.
Noticed while resolving merge conflicts on PR #1933 ("refactor: widen outputResult signature, remove redundant casts at call sites").
Context: #1933 widens the real
outputResultfunction (src/presentation/result-formatter.ts) fromdata: Record<string, any>todata: object.CommandContext.outputResultinsrc/types.ts(the DI-shape type used to passoutputResultinto CLI commands) still types itsdataparameter asany, predating this PR — confirmed already present on #1933's own branch tip before any conflict resolution touched the file, so this isn't something the merge introduced.Not a functional bug: an
any-typed parameter is structurally compatible with any narrower type, so no type error results. Purely a documentation/consistency gap — theCommandContextinterface's field type doesn't reflect the real function's now-narrower signature.Fix: change
outputResult: (data: any, key: string, opts: any) => boolean;tooutputResult: (data: object, key: string, opts: any) => boolean;(or reuse whatever named parameter type the real function now uses) insrc/types.ts.