-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Spread arguments should appropriately spread into optional parameters #4759
Labels
Milestone
Comments
👍 |
mhegazy
added
Suggestion
An idea for TypeScript
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
labels
Sep 17, 2015
should be subsumed by a fix to #4130 |
mhegazy
added
Fixed
A PR has been merged for this issue
and removed
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
labels
Aug 31, 2017
on a closer look, this is already fixed. |
@mhegazy @DanielRosenwasser using I am confused because most of the tickets said close but this still happening |
Yeah, I don''t think this works. let str = "abc";
let arr = [...str]; Maybe it requires some configuration. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Adapted from #4755.
Currently the following is fine:
However, it might be the case that you want to be clear about how
things
will be used when your function gets called, so it should be fine to use an optional parameter fora
:Currently, with the invocation of
f
above you'll get the error messageSupplied parameters do not match any signature of call target.
even thougha
is optional.The text was updated successfully, but these errors were encountered: