-
Notifications
You must be signed in to change notification settings - Fork 12.8k
optional argument that don't need to be specified #50657
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
It's true that at runtime, |
You got it wrong. i wasn't talking about the promise constructor. i was talking about the resolver's argument |
RE: Promise, we know that this isn't ideal; see #46570, #40505. What we'd need is some sort of concrete proposal that would help things. RE: The constructors, we already have the overloads in place such that types like This isn't the case for ArrayBuffer, but it's really to just explicitly pass in |
Suggestion
Some stuff have become to strict... that it's becoming too annoying!
it's not only that.
new ArrayBuffer()
andnew Uint8Array()
is also something that requires an argument but it's perfectly fine to omit it to represent a 0 length buffer in the cases where you need a empty placeholder🔍 Search Terms
promise resolve
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
📃 Motivating Example
💻 Use Cases
The text was updated successfully, but these errors were encountered: