Type: type-safety / architecture · Difficulty: medium
The only any usages in the repo are all in @bb/sqlite and violate the "never any" rule: aggregateStats.ts:97 (pickCommits(source: any)), :127 (deriveRepoName(source: any, info: any)), knowledge.ts:74 (push({…} as any)). aggregateStats.ts also defines a CommitHashRecord that is structurally identical to the object pushed in knowledge.ts.
Do: define a shared CommitHashEntry type in @bb/types, reuse it in both files; type pickCommits(source: unknown) and narrow; type deriveRepoName params from KnowledgeDoc["source"]/["info"]. Remove the as any and the eslint-disable comments.
Done when: no any remains in @bb/sqlite; the commit-hash shape lives in one place.
Type: type-safety / architecture · Difficulty: medium
The only
anyusages in the repo are all in@bb/sqliteand violate the "never any" rule:aggregateStats.ts:97(pickCommits(source: any)),:127(deriveRepoName(source: any, info: any)),knowledge.ts:74(push({…} as any)).aggregateStats.tsalso defines aCommitHashRecordthat is structurally identical to the object pushed inknowledge.ts.Do: define a shared
CommitHashEntrytype in@bb/types, reuse it in both files; typepickCommits(source: unknown)and narrow; typederiveRepoNameparams fromKnowledgeDoc["source"]/["info"]. Remove theas anyand the eslint-disable comments.Done when: no
anyremains in@bb/sqlite; the commit-hash shape lives in one place.