Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Connecting typescript errors to their associated compiler options (tsconfig.json)

$
0
0

How can I find out which compiler option is associated with a given Typescript error?

I'm using Typescript in VSCode, and Typescript frequently points out problems, like initializer provides no value for this binding element

(Please note this is a warning generated by Typescript, not TSLint).

In tsconfig.json, I can turn off specific warnings, such as

"compilerOptions": {
  "noImplicitAny": false,
  "strictPropertyInitialization": false
}

But as far as I can tell, there's no way to find out which compiler option is associated with which error.

Clues so far, but no solution:

This SO post, Complete list of Typescript error codes and their fixes, provides a list of messages, but not with which compiler option en/disables the message.

And unfortunately, the names of the compiler options do not mimic the wording of the errors, so you can't find the error via simple intellisense within tsconfig.json.

Additionally, the official docs seem not to provide such an error-to-option mapping, either: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html , https://www.typescriptlang.org/docs/handbook/compiler-options.html .

So, just to restate the question: how can I find out which compiler option to turn off to silence a given error?


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>