talira

TypeScript

JavaScript with static types, compiled to plain JavaScript

open sourceApache-2.0self-hostablefree

TypeScript is Microsoft's typed superset of JavaScript: optional static types, interfaces and generics that the compiler (tsc) checks and then strips, producing readable standard JavaScript for any browser or runtime. Its language service powers autocompletion, refactoring and go-to-definition in most editors, and type definitions exist for nearly every popular npm package. Apache-2.0 licensed.

Ways to install

Package managers

Libraries for JavaScript and TypeScript

View 40 more

Browse all of them: 369 libraries, 92 frameworks, 396 APIs.

Problems it solves

  • JavaScript bugs from passing the wrong shape of object keep reaching production
  • refactoring a big JavaScript codebase is scary because nothing tells me what breaks
  • want autocomplete and type errors in my editor for JavaScript
  • add types to an existing JavaScript project gradually
  • document what a function accepts and returns in a way the compiler checks
  • a statically typed language that runs anywhere JavaScript does
  • which language should I use to write both my web frontend and my Node.js backend with type checking

Features

  • static type checking
  • type inference
  • generics
  • language service for editors
  • compiles to standard JavaScript
  • declaration files

Capabilities

Has an APIplan not known
Has a command line toolplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what TypeScript does.

  1. Flow A static type checker and typed dialect of JavaScript
  2. Elm A delightful language for reliable webapps
  3. JavaScript Specifying JavaScript.
  4. ReScript A robustly typed language that compiles to efficient, human-readable JavaScript

Compare TypeScript with the top 3