Missed typed header value type
Environment
Nodejs v20.15.0
Reproduction
_
Describe the bug
Since the latest release of unjs/h3 v1.12.0, TypedHeaders 'retry-after' is missing string type:
https://github.com/unjs/h3/blob/6765a6e2026e203a4ea775964f855070e114f0bf/src/types/_headers.ts#L42
According to MDN docs, it can take as number (seconds) as well as a date string:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
Additional context
In Nuxt app, I'm trying to set the response headers by this:
...
setResponseHeader(event, 'Retry-After', (maintenanceDateTo || dateNextDay).toUTCString())
Previously it worked fine since number or string values were valid. Now TS drops an error in a reason described above.
Logs
No response
Currently it is set to string. Also setResponseHeaders is deprecated. @pi0 I think this issue can be safely closed.
@s0h311 nope, it uses AnyString now, but it should also allow number.
Should be closed in v2, since v2 removed these types and all headers will be plain string. 🤔