mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
fix trailing comma should not allowed in dynamic import argument
This commit is contained in:
@@ -31178,7 +31178,7 @@ namespace ts {
|
||||
if (nodeArguments.length !== 1) {
|
||||
return grammarErrorOnNode(node, Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
|
||||
}
|
||||
|
||||
checkGrammarForDisallowedTrailingComma(nodeArguments);
|
||||
// see: parseArgumentOrArrayLiteralElement...we use this function which parse arguments of callExpression to parse specifier for dynamic import.
|
||||
// parseArgumentOrArrayLiteralElement allows spread element to be in an argument list which is not allowed as specifier in dynamic import.
|
||||
if (isSpreadElement(nodeArguments[0])) {
|
||||
|
||||
Reference in New Issue
Block a user