mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
make it work with AssignmentRestElement
This commit is contained in:
1 parent
090326be6a
commit
51b752bbda
7 files changed
+32
-25
No files matched your search
@@ -21066,7 +21066,7 @@ namespace ts {
|
||||
else {
|
||||
checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma);
|
||||
const type = isTupleType(sourceType) ?
|
||||
getArrayLiteralType((sourceType.typeArguments || emptyArray).slice(elementIndex, getTypeReferenceArity(sourceType))) :
|
||||
sliceTupleType(sourceType, elementIndex) :
|
||||
createArrayType(elementType);
|
||||
return checkDestructuringAssignment(restExpression, type, checkMode);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user