lookup> .ts

.TS·File Extension

TypeScript FileTypeScript source file with static type annotations.

Extension.ts
File typeTypeScript File
MIME typevideo/mp2t
CategoryVideo
Charset
Compressible
Format familytypescript

What is a .ts file?

A .ts file is a TypeScript File — TypeScript source file with static type annotations.

In the mime-db registry it maps to video/mp2t. When serving .ts over HTTP, set the Content-Type header as shown in Developer info below.

Related entities: it maps to video/mp2t and is used by TypeScript, XML among others — and is delivered over HTTP via the Content-Type header.

  • Use VS Code or TypeScript to open and edit .ts files.
  • Any text editor (Notepad, VS Code) can inspect the raw content as text.

When served over HTTP, responses should set the following header:

Content-Type: video/mp2t

Common software that reads/writes .ts:

VS CodeTypeScriptNode.js
.tsextension of
format
typescriptserved as
mime type
video/mp2tsent via header
http header
  • Movies and clips
  • Streaming media
  • Screen recordings
  • Open the file with VS Code, make your changes and save.
  • Most editors preserve the original formatting and encoding — avoid changing the charset.
  • Create a new file and save it with the .ts extension, or export this format from VS Code.
function greet(name: string): string {
  return `Hello, ${name}!`;
}

greet('World');

What programs can open .ts files?

Common options include VS Code, TypeScript, Node.js. You can also open many of these files with built-in viewers or a browser.

How do I create a .ts file?

Create a new file in any text editor or the app that owns the format and save it with the .ts extension.

What is the relationship between .ts and the video/mp2t MIME type?

video/mp2t is the media type identifier used for .ts files during network transfer (for example in the HTTP Content-Type header).

Updated 2026-08-18

Related extensions

Related MIME types

Related programming languages

Related headers

Related methods

Related status codes