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
I compiled this code separately using version 5.7 of tsc(The same applies to other versions as well) and found that when I used the "tsc file. ts" command, the first error was not reported. At this point, I used tsc -- showConfig and found that the default configuration file was being used, with the following configuration:
When I add "include:" file. ts "to tsconfig. json and use the tsc -- project tsconfig. json command to execute file. ts, TSC can report all syntax errors completely.
I have tried to modify the compilation options in the configuration file (for example, strict, moduleresolution), but I found that no matter how you modify the compilation options, the results are the same: use playground and TSC -- project tsconfig JSON can get complete error information by executing the code in these two ways, while the command using tsc+filename will not report the syntax error of "duplicate identifier".
I wonder if this inconsistency is due to the way I execute the program. However, I personally believe that the report of syntax errors should not be related to this.
π Expected behavior
The error message of TSC should be consistent using different execution methods.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered:
when I used the "tsc file. ts" command, the first error was not reported. At this point, I used tsc -- showConfig and found that the default configuration file was being used, with the following configuration:
This is working as intended and documented. When you provide a list of filenames to compile, then your local tsconfig is not used.
π Search Terms
"inconsistent error massage", "tsconfig"
π Version & Regression Information
β― Playground Link
No response
π» Code
π Actual behavior
The TS code above should have two kinds of syntax errors :
I compiled this code separately using version 5.7 of tsc(The same applies to other versions as well) and found that when I used the "tsc file. ts" command, the first error was not reported. At this point, I used tsc -- showConfig and found that the default configuration file was being used, with the following configuration:
However, in fact, the tsconfig.json I configured in the root directory is as follows:
When I add "include:" file. ts "to tsconfig. json and use the tsc -- project tsconfig. json command to execute file. ts, TSC can report all syntax errors completely.
I have tried to modify the compilation options in the configuration file (for example, strict, moduleresolution), but I found that no matter how you modify the compilation options, the results are the same: use playground and TSC -- project tsconfig JSON can get complete error information by executing the code in these two ways, while the command using tsc+filename will not report the syntax error of "duplicate identifier".
I wonder if this inconsistency is due to the way I execute the program. However, I personally believe that the report of syntax errors should not be related to this.
π Expected behavior
The error message of TSC should be consistent using different execution methods.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: