Someone on Twitter mentioned that updating the jsx option in their editor was not updating their errors.
https://twitter.com/cromas/status/1636995012482453505
I looked into this and noticed that both --jsx and --checkJs are not tracked as affectsSemanticDiagnostics.
| { |
| name: "checkJs", |
| type: "boolean", |
| showInSimplifiedHelpView: true, |
| category: Diagnostics.JavaScript_Support, |
| description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, |
| defaultValueDescription: false, |
| }, |
| { |
| name: "jsx", |
| type: jsxOptionMap, |
| affectsSourceFile: true, |
| affectsEmit: true, |
| affectsBuildInfo: true, |
| affectsModuleResolution: true, |
| paramType: Diagnostics.KIND, |
| showInSimplifiedHelpView: true, |
| category: Diagnostics.Language_and_Environment, |
| description: Diagnostics.Specify_what_JSX_code_is_generated, |
| defaultValueDescription: undefined, |
| }, |
In fact, I wonder if checkJs also needs the same options as allowJs (i.e. affectsModuleResolution: true) since one turns the other on implicitly.
| { |
| name: "allowJs", |
| type: "boolean", |
| affectsModuleResolution: true, |
| showInSimplifiedHelpView: true, |
| category: Diagnostics.JavaScript_Support, |
| description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, |
| defaultValueDescription: false, |
| }, |
Someone on Twitter mentioned that updating the
jsxoption in their editor was not updating their errors.https://twitter.com/cromas/status/1636995012482453505
I looked into this and noticed that both
--jsxand--checkJsare not tracked asaffectsSemanticDiagnostics.TypeScript/src/compiler/commandLineParser.ts
Lines 651 to 671 in 3fab5ff
In fact, I wonder if
checkJsalso needs the same options asallowJs(i.e.affectsModuleResolution: true) since one turns the other on implicitly.TypeScript/src/compiler/commandLineParser.ts
Lines 642 to 650 in 3fab5ff