I'm new to the development, currently working on Angular 2 I came across a problem while saving the .ts (typescript) file in my computer (Win 7). I have run the commands using npm:
>npm install typescript
but when I try to save the text file to .ts file it creates MPEG 2 TS file. How to resolve this problem. Please help!
A TS file is a type of video stream file. It's used to store video content on DVD and Blu-ray discs. It makes use of standard MPEG compression in order to compress video data, mostly being used for saving streamed or broadcast video content.
Another option for opening the TS file is to rename it to something that your existing media player will support, like . MPEG. Most multimedia players already support . MPEG files, and since TS files are MPEG files, the same program should also play your TS file.
It doesn't get saved in MPEG-2 TS format. Windows just interprets the .ts extension as MPEG-2 TS and shows a video file like icon for your .ts file. You can ignore that.
The fact that windows treats .ts
files as video
is super annoying for anyone working with typescript daily.
I couldn't find a way to change this in regedit, but I found an app called FileTypeMan.
I used it to set mime type to text/plain
and perceived type to text
.
Now the explorer doesn't try to generate a video thumbnail when i open a folder with typescript files any more.
I don't like that I had to download a program for this, but at least it doesn't need admin rights to run.
If someone find a way to do it with only regedit please share.
You can modify how Windows opens any file, with these steps (in this case, a TypeScript source code file):
Properties
You will see the properties configuration window (showing second section in the General
tab):
Click in the Change...
button
Then, select your preferred text/code editor or IDE
In this case, I have selected Visual Studio Code:
Click in OK
, and that is all. Windows 10 will read all .ts
files as source code files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With