-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Make trailing commas on binding/rest not an error in .d.ts files #23070
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
Comments
Can we emit a warning instead? Silent is not a good solution either. |
Declaration files will never be executed and are just metadata (for the compiler itself) - I think we can silently be more permissive in them. |
But it would be nice to be able to detect them somehow so that typings authors can fix them easily. Another way is to rely on ts-lint auto-fix to remove all trailing commas. :) |
Those tools can still find and remove trailing rest/bind commas; we just don't need to report an error in a |
Uh oh!
There was an error while loading. Please reload this page.
#22262 is pretty breaky, and the change is to be more spec compliant. To reduce how breaky the change is, we shouldn't report the error if it happens in a
.d.ts
file, as there will be no associated emit - this way older.d.ts
files won't need to be updated just to remove trailing commas that we can actually handle just fine.The text was updated successfully, but these errors were encountered: