I cannot get IntelliJ/WebStorm to associate a ".ts" file as TypeScript file.
I have created a file named confirmationRequiredRenderer
. Initially I created this file by just creating a text file and then adding a .ts
at the end of the file name.
Now, no matter what I do, I cannot associated this file as a TypeScript file type. It thinks it is a text file.
These are the actions I have gone through to fix this problem and nothing has worked:
Any advice on why my IDE is so confused with this file?
I have created a file named
confirmationRequiredRenderer
. Initially I created this file by just creating a text file and then adding a.ts
at the end of the file name.
That is the source of the problem: the confirmationRequiredRenderer
file name is now associated with the Text file type. And it has a "priority" because it's longer/more specific than just default *.ts
.
You need to go into the IDE Settings/Preferences and remove such a association for more broad *.ts
to be used instead.
Settings/Preferences | Editor | File Types
Settings/Preferences | Editor | File Types
Text
file type thereconfirmationRequiredRenderer
or very similar to that.If still nothing (pretty unlikely but still possible): it may still have an association in another file type, so may need to check other files types for the same.
PS Another alternative is to hard-override the file type for that specific file . Just right click on the file in the Project View panel and choose the right action ( Override File Type ).
It will work for that specific file but will still be an issue for the file with the same name in another project/another folder. So it's much better to fix the original source of the issue.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.