You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: widen outputResult signature, remove redundant casts at call sites
outputResult took data: Record<string, any>, whose any-typed index signature
already made TypeScript skip the "index signature is missing" check for
plain interfaces -- so callers never actually needed the defensive
`as unknown as Record<string, unknown>` cast; they just carried it forward
as noise. Widen the parameter to `object` (outputResult only serializes/
formats data and never returns or re-exposes its shape, so a generic isn't
needed) and move the one necessary cast to Record<string, unknown> inside
outputResult itself, where it's actually justified by printNdjson/printCsv/
printAutoTable needing key access for NDJSON field plucking and CSV/table
flattening. Removes the cast from all 22 current call sites across
audit.ts, triage.ts, owners.ts, and queries-cli/{impact,path,exports,
inspect,overview}.ts.
docs check acknowledged: internal type-signature cleanup only, no new
features/languages/architecture/CLI surface -- README.md, CLAUDE.md, and
ROADMAP.md do not need updates.
Fixes#1803
Impact: 23 functions changed, 79 affected
0 commit comments