TypeScript is a programming language made by Microsoft. It is a typed superset of JavaScript: JavaScript syntax is also valid TypeScript syntax, and TypeScript adds a syntax for types, which state what kind of value (a number, a string, an object of a given shape) a variable or a function can hold.
The TypeScript compiler is a static type checker: it finds errors before the program runs, for example a read of a property that does not exist, based on the types of the values. The developer writes types (interfaces describe the shape of objects), or the compiler infers them from the code. Code editors use the same information to show errors, auto-complete and documentation while the developer types. To run the program, the compiler removes the types and outputs plain JavaScript, which runs in a browser, on Node.js, Deno or Bun. An existing JavaScript project can add types step by step, also through JSDoc comments.
TypeScript is open source under the Apache 2.0 license; its code is in the microsoft/TypeScript repository on GitHub, and it installs from npm. It is free to use.