Commit bd0afc6
committed
fix(engine): ObjectRepository declares the findOne/update shapes it already publishes
`IScopedObjectRepository.findOne` / `.update` declare `Record<string, any> | null`
and `Record<string, any> | number | null`, and `IDataEngine` — the call each of
these forwards to — declares the same. `ObjectRepository` sat between two narrow
declarations and re-widened the value back to `Promise<any>` on the way out, which
`implements IScopedObjectRepository` accepts (a wider return always satisfies a
narrower one) while every call site reaching a repository through the CLASS kept
reading `any`, `ObjectQL.createContext(…).object(n).findOne(…)` included.
Census: one consumer, `engine-filter-alias.test.ts`, which read `.status` off a
value that can be null. Repaired with the file's own `not.toBeNull()` / `!` idiom.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XTBcV7zZHmokdyQgXjbyEU1 parent ae19f5e commit bd0afc6
2 files changed
Lines changed: 38 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
221 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14707 | 14707 | | |
14708 | 14708 | | |
14709 | 14709 | | |
14710 | | - | |
| 14710 | + | |
| 14711 | + | |
| 14712 | + | |
| 14713 | + | |
| 14714 | + | |
| 14715 | + | |
| 14716 | + | |
| 14717 | + | |
| 14718 | + | |
| 14719 | + | |
| 14720 | + | |
| 14721 | + | |
| 14722 | + | |
| 14723 | + | |
| 14724 | + | |
| 14725 | + | |
| 14726 | + | |
14711 | 14727 | | |
14712 | 14728 | | |
14713 | 14729 | | |
| |||
14725 | 14741 | | |
14726 | 14742 | | |
14727 | 14743 | | |
14728 | | - | |
| 14744 | + | |
| 14745 | + | |
| 14746 | + | |
| 14747 | + | |
| 14748 | + | |
| 14749 | + | |
| 14750 | + | |
| 14751 | + | |
| 14752 | + | |
| 14753 | + | |
| 14754 | + | |
| 14755 | + | |
14729 | 14756 | | |
14730 | 14757 | | |
14731 | 14758 | | |
| |||
0 commit comments