Software Development

What is TypeScript?

Quick answer

A programming language developed by Microsoft that adds static types to JavaScript and compiles to plain JavaScript.

TypeScript, explained

TypeScript was released in 2012. It is a superset of JavaScript, meaning any valid JavaScript is also valid TypeScript, but it lets developers declare types for variables, function parameters, and objects. A compiler checks these types before the code runs and converts it into standard JavaScript that browsers and Node.js understand.

For example, declaring that a function expects a number means the editor will flag an error if someone passes text by mistake. This catches many bugs early, enables smarter code completion, and makes large codebases easier to refactor. TypeScript has become widely adopted in frontend frameworks like React and Angular, and on the backend with Node.js. The trade-off is an extra build step and some learning curve.

Related terms

Guides that mention TypeScript