Commit 9419354
committed
fix(objectql): declare
`pnpm --filter @objectstack/objectql typecheck` exited 2 on the previous
commit:
src/hook-withheld-readonly-fault.ts(140,20): error TS2554: Expected 0-1 arguments, but got 2.
src/hook-withheld-readonly-fault.ts(140,31): error TS2304: Cannot find name 'ErrorOptions'.
This repo compiles against `lib: ES2020`, where `Error` has neither a `cause`
member nor the `ErrorOptions` constructor overload that carries one. The
precedent is in this same package: `duplicate-record-error.ts` declares
`readonly cause: unknown` on the class and assigns it by hand, and its comment
already records why -- an undeclared assignment would be invisible to every
TypeScript consumer of the field. Followed verbatim rather than reinvented.
No behaviour change: the same original error is attached under the same name,
and both suites plus the reverse verification were re-run against a forced
rebuild after the edit.
Claude-Session: https://claude.ai/code/session_01XTBcV7zZHmokdyQgXjbyEU
Co-authored-by: Claude <noreply@anthropic.com>cause on the fault error instead of passing it through super()
1 parent e94f8ae commit 9419354
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
139 | 150 | | |
140 | | - | |
| 151 | + | |
141 | 152 | | |
142 | 153 | | |
| 154 | + | |
143 | 155 | | |
144 | 156 | | |
145 | 157 | | |
| |||
0 commit comments