-
Notifications
You must be signed in to change notification settings - Fork 441
type RequestInfo should include URL #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think the intricacy for the latter is that it's not very type-safe and more error-prone, since everything will toString to something, but it's often not what you expect it to be unless it's a primitive. They use the same thing for dataset/css style values, as well as other writeables, even if the spec allows and/or encourages it (for instance writing to |
Yeah, it feels like |
Agree, I think we probably don't want this |
Related: #1003 |
Actually I would think we do want this. https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters
|
as well as: #600
similar: microsoft/TypeScript#43066 |
Currently
RequestInfo
isRequest | string
, but should (minimally) beRequest | URL | string
.fetch(new URL('/some_api', 'https://example.com'))
is valid, and works as you'd expect.Technically it should be
Request | { toString(): string } | string
according to MDN, but I'm not sure if there are intricacies around that.The text was updated successfully, but these errors were encountered: