Is it possible, if yes, how? I want to achieve something like (e.g., in the compilerOptions
in tsconfig.json
):
// ATTENTION PSEUDO CODE
suppressErrors: ['TS7017', ....]
p.s. TS7017: Index signature of object type implicitly has an 'any' type.
EDIT: FYI, I would like to suppress any desired error; TS7017 is only an example.
You can ignore type checking errors for a single line by using the // @ts-ignore comment. Copied! The // @ts-ignore comment ignores any type checking errors that occur on the next line. If you use a linter, you might get an error when you use a comment to disable type checking for a line, or for the entire file.
TypeScript's strict mode parameter can be configurated as several individual parameters for each specific case of type checking. So, basically, if you set the parameter strict to true in tsconfig. json it means that all these strict options are set to true.
The tsconfig. json file specifies the root files and the compiler options required to compile the project. JavaScript projects can use a jsconfig. json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.
The include and exclude properties take a list of glob-like file patterns. The supported glob wildcards are: * matches zero or more characters (excluding directory separators) ? matches any one character (excluding directory separators)
Suppressing certain errors
There is no option for that at the moment. I've created an issue to track it : https://github.com/Microsoft/TypeScript/issues/11051
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With