Rest declarations in destructured arrays receiving incorrect types from tuples declaring the types in the destructured array #16700
Labels
Fixed
A PR has been merged for this issue
Milestone
TypeScript Version: 2.3.4
Code
Expected behavior:
When destructuring the method parameter (which can be an array of potentially anything after middleware has had its say, but I know exactly what it will be in this case) I've gathered the remaining array values (which I know to be strings) into
roleNames
and declared the type of the variables in the destructured array via the tuple[ResourceLoader, string, string[]]
.I expect
roleNames
to take on the declared type from the tuple asres
andcommandName
have correctly done.Actual behavior:
When hovering over the
roleNames
declaration I get the following:Apologies for the convoluted title. Couldn't think of a less verbose description.
The text was updated successfully, but these errors were encountered: