You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suppress only specified errors using '// @ts-ignore' comments. #21197
In some special cases it's ok to ignore error using '// @ts-ignore' comment. But, good practice is ignore only pecific error, not all possible errors. There is an issue with way, how to specify error, there is no public error codes, messages are localized. We have no way to point what diagnostic we want to ignore. But we have diagnosticMessages.json that contains codes.
My proposal is: Include error code to diagnostic message, and then allow to specify what error compiler should ignore, may be like this // @ts-ignore:1048
May be it would be better to create human readable identifiers for all error and use them instead number codes.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
typescript-bot commentedon Jan 30, 2018
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Busyrev commentedon Feb 3, 2018
I think it is not a duplicate of #19139. My idea is specify error number in //ts-ignore comment ingnore only errors you want to, not all possible