Commit 15ab7f9
types(core): use removal-marker literal for messageTypeField error message
Per PR review: `messageTypeField?: never` produces a generic "Type
'string' is not assignable to type 'never'" diagnostic. Switch to a
removal-marker string literal so the diagnostic surfaces the migration
hint right at the offending call site, e.g. "Type 'type' is not
assignable to type '__REMOVED_USE_messageTypeResolver_INSTEAD__ |
undefined'".
Note on the `messageTypeField: undefined` loophole: closing it would
require enabling `exactOptionalPropertyTypes` package-wide, which
produces ~13 unrelated type errors in core (HandlerContainer,
MessageSchemaContainer, AbstractQueueService, startupResourcePolling)
and is a separate refactor. Passing `undefined` is operationally
identical to omitting the field, so this guard catches the realistic
regression — `messageTypeField: '<name>'`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e8358a7 commit 15ab7f9
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | | - | |
| 131 | + | |
127 | 132 | | |
128 | 133 | | |
129 | 134 | | |
| |||
0 commit comments