Trailing comma in dynamic import should be allowed also when used in a typeof
type
#61489
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
trailing comma dynamic import
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?#code/CYUwxgNghgTiAEBbA9sArhBAiAZs5W8A3gL4BQZYyAdgM4Au8AbvALzxQDuUAloz4gAOyGPQAUufFgA0ASgDcZegE9BCACpt4KtchzwBw0RLwE5iyjQbMATFq69+QkeMlnS5pao132OkHoGzsZuMh4KZEA
π» Code
π Actual behavior
The trailing commas in the type-level
import()
s are reported as syntax errorπ Expected behavior
The syntax of
import()
at the type-level should match the one at the value level, thus allowing trailing commas.Additional information about the issue
Note that the error was correct before import attributes, but import attributes changed the dynamic import syntax to allow trailing commas.
The text was updated successfully, but these errors were encountered: