Commit 34fd976
committed
fix(plugin-auth): 测试层的冗余 object 键跟进 DriverQuery,台账不抬 (#6075)
check:type-check-debt 的全仓 re-measure 报 plugin-auth 从 131 涨到 132
(+1)。plugin-auth 的 tsconfig 把 **/*.test.ts 排除在外,所以 per-package
`pnpm typecheck` 看不见它,只有把排除掀掉的全仓 re-measure 量得到。
定位到的就是一处:
src/auth-where-operator-coverage.test.ts(383,7): error TS2353:
Object literal may only specify known properties, and 'object'
does not exist in type 'DriverQuery'.
`driver.find('sys_user', { object: 'sys_user', fields: ['id'] } satisfies
QueryAST)` —— 删掉的值与第一个实参逐字相同,属重拼类。承载类型按第三类
处置改为 `satisfies DriverQuery`:该处上方注释明确写了「这里不能用 as any,
否则会被 check:query-options-erasure (#4674/#4918) 记一笔」,所以保留
satisfies、只换目标类型,正是它原本的意图。
⛔ 未抬台账数字:门禁原话「the ledger is a ratchet and may only shrink」
(#5278),本单是自己引入的 +1,属可约。改完复测回到 131,与台账记录一致。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WyvqvKMG6asi9aXjKE6xtx1 parent ae9fe54 commit 34fd976
1 file changed
Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
383 | | - | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
0 commit comments