Skip to content

Suppress only specified errors using '// @ts-ignore' comments. #21197

Closed
@Busyrev

Description

@Busyrev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions