0

MyProject code shot package.json

I create a new project to try typescript. I want to use types checking in both .ts and .tsx files without useing import.

All right with .ts files. But the vscode shows problems with .tsx files. I don't know what's wrong. T_T.

I have google a lot. And try to edit tsconfig.json "include". But still not working.

  • Please insert the JSON as text in your question instead of sharing screenshots. – sm3sher Apr 25 '23 at 12:53
  • As the previous commenter mentioned, paste the tsconfig JSON as a code snippet inside the question and just explain where your other files are relative to each other. You can keep the images for extra visualisation, but SO questions should aim to be readable without external resources – 5ar Apr 25 '23 at 12:59
  • While you're doing that I will say that if you want global types (i.e. types you do not need to import), those go under the [`typeRoots`](https://www.typescriptlang.org/tsconfig#typeRoots) or [`types`](https://www.typescriptlang.org/tsconfig#types) properties of tsconfig – 5ar Apr 25 '23 at 13:03
  • Please provide enough code so others can better understand or reproduce the problem. – Community Apr 26 '23 at 03:03

0 Answers0