Closed rahamin1 closed 5 years ago
Hi. First of all, consider updating your Atom and Atom-TypeScript installations, Atom 1.31.0 is rather old by this point.
Well, I can tell you that it's not the intended behaviour. Since I don't have enough context information to actually pinpoint the issue, here are a few random ideas:
tsx
is actually different from ts
in that, unlike the latter, the former allows JSX syntax. JSX being an HTML-like embedded syntax in JavaScript (or TypeScript in this case) popularized by the React framework. So if you have JSX code in your file, renaming it to .ts
effectively turns all JSX into syntax errors.typescript:restart-all-servers
command. Also see our FAQ for more information.includes
and excludes
; or if you're using deprecated files
, first of all, don't, and second, add the new filenames there) in that file do not include .ts
files, then tsserver won't pick up those files as part of that project, which will lead to all kinds of fun error reports, from being unable to find modules, to invalid syntax being used if you're using syntax extensions (like decorators for instance), to really obscure errors about missing some support library.Thanks! (1) explains it... I have jsx.
I am using atom 1.31.0 with atom-typescript 13.2.1.
Parsing of .tsx files is fine. However, when I rename a .tsx file to .ts, I get many errors.
I checked in atom-typescript, and TypeScript file extensiuon is set to the default value (
.ts, .tst, .tsx
).Any idea?