I have a problem with Angular project and syntax of TypeScript, I make a new empty Angular project but PhpStorm (2019.2.1) don't recognize TypeScript syntax.
2 Answers
Looks like the .ts extension is assigned to XML file type in Settings | Editor | File Types. Please remove all .ts patterns from this file type and make sure that *.ts is listed among patterns registered for TypeScript:
For Angular and other JS,TS based Web development I recommend using :
- Webstorm , it's by Jetbrains, same as PHPStorm
- Visual Studio Code
However, if you follow these steps, you should not face such issue:
https://www.jetbrains.com/help/phpstorm/angular.html
Also, as in comments by LazyOne: PhpStorm syntax problem with Angular project
4 Comments
LazyOne
PhpStorm = WebStorm + PHP + DB. Some plugins needs to be installed manually/separately. Please check this link before making such statements: stackoverflow.com/a/25647482/783119
Yash
So why is the OP facing this issue?
LazyOne
Possible broken settings or accidental misconfiguration.
.ts files getting recognized just fine here out of the box.Yash
I too found that is completely supports Angular, thanks for pointing out, answer updated,


Settings (Preferences on macOS) | Editor | File Types-- look under "XML" file type -- ensure that no unusual pattern is present there (bottom list for that file type).