Commit 8c07ad9
fix: emit stringish types for HTTP header parameters
Header parameters now emit \`${number}\` and 'true'|'false' literal types
instead of native number/boolean, matching how query and path parameters
already work.
HTTP headers are strings on the wire, and rest-client's Command<...>
defaults its CommandHeaders generic to Record<string, string>. A
generated header type containing a number-typed field could not satisfy
that constraint, breaking command construction at the call site.
The coerced valibot schema already accepts string|number on parse, so
runtime behaviour is unchanged — only the user-facing input type widens.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6dab841 commit 8c07ad9
3 files changed
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
| 552 | + | |
| 553 | + | |
556 | 554 | | |
557 | 555 | | |
558 | 556 | | |
| |||
0 commit comments