Commit ad953bd
committed
fix(types): restore explicit-undefined on AuthenticatedRequest.auth
Reverts the | undefined removal from ee07b85. Our internal type
keeps auth?: AuthInfo | undefined so callers can pass an
undefined-stamped request without ceremony.
The MCP transport's handleRequest() parameter is stricter
(auth?: AuthInfo, no | undefined) under exactOptionalPropertyTypes,
so we cast at the call boundary via a McpHandleRequest type alias.
Three handleRequest sites now read:
await transport.handleRequest(authenticatedReq as McpHandleRequest, ...)
That keeps the narrow constraint at the boundary rather than
forcing it on our internal shape.1 parent ee07b85 commit ad953bd
1 file changed
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
306 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
307 | 316 | | |
308 | 317 | | |
309 | 318 | | |
| |||
326 | 335 | | |
327 | 336 | | |
328 | 337 | | |
329 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
330 | 342 | | |
331 | 343 | | |
332 | 344 | | |
| |||
349 | 361 | | |
350 | 362 | | |
351 | 363 | | |
352 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
353 | 368 | | |
354 | 369 | | |
355 | 370 | | |
| |||
0 commit comments