Generated by DeepSeek V3.2| TypeScript | |
|---|---|
![]() TypeScript · Public domain · source | |
| Name | TypeScript |
| Paradigm | Multi-paradigm |
| Designer | Microsoft |
| Developer | Microsoft |
| Typing | Static, gradual, structural |
| Influenced by | JavaScript, Java, C# |
| Influenced | AtScript, AssemblyScript |
| Operating system | Cross-platform |
| License | Apache License 2.0 |
| Website | https://www.typescriptlang.org/ |
| File ext | .ts, .tsx |
TypeScript. It is a strict syntactical superset of JavaScript that adds optional static typing and is designed for the development of large applications. First made public in 2012 by Microsoft, it compiles to plain JavaScript and is a primary language for client-side and server-side development, notably within frameworks like Angular and React. The language aims to improve developer productivity and code quality by catching errors during compilation and enhancing tooling support through features like type inference and IntelliSense.
The development of the language was led by Anders Hejlsberg, the chief architect also known for his work on Turbo Pascal, Delphi, and C#. It was first introduced internally at Microsoft to address the challenges of scaling JavaScript applications, with its initial public release, version 0.8, occurring in October 2012. A significant milestone was reached with the release of version 1.0 at the Build conference in 2014, signaling its readiness for enterprise adoption. The language's evolution has been closely tied to the standardization process of ECMAScript, often incorporating proposed features from TC39 to ensure alignment with the future of JavaScript. Key stewardship of the project has been maintained by Microsoft through its team at Microsoft Research, with ongoing development and specification managed as an open-source project on GitHub.
The core design goal is to be a compile-time type checker for JavaScript without imposing a runtime overhead, positioning it as a tool for application-scale development. Its type system is structurally based, drawing inspiration from type theory concepts found in languages like ML and influencing later projects such as Flow. A fundamental principle is that any valid JavaScript program is also a valid program in this language, ensuring seamless interoperability and gradual adoption. The compiler, named `tsc`, performs static program analysis to emit clean, idiomatic ECMAScript code while providing rich error messages. This design philosophy emphasizes tooling enablement, providing a foundation for advanced editor features in Visual Studio Code and other IDEs.
A primary feature is optional type annotations, which allow developers to describe the shape of objects and function signatures. The language supports sophisticated type inference, reducing the need for explicit annotations while still providing safety. It introduces advanced types like unions, intersections, generics, and conditional types, enabling expressive modeling of API contracts. Language features such as decorators, async/await, and modules align closely with ECMAScript standards. The JSX syntax extension, popularized by React, is supported through the `.tsx` file extension. Other notable capabilities include mixins, enums, and namespaces, which provide organizational structures for large codebases.
Widespread adoption began in earnest with its selection as the primary language for Angular 2, a decision by Google that significantly boosted its profile. It is heavily used by major technology firms including Microsoft, Google, Airbnb, and Slack for both front-end and back-end development, often with Node.js. The language consistently ranks highly in developer surveys such as the Stack Overflow Developer Survey and the State of JS report. Its use is prevalent in full-stack development, powering applications built with Next.js, NestJS, and Vue.js. Many popular JavaScript libraries and frameworks, including Express.js, Jest, and Three.js, provide or are written with type definitions, facilitated by the DefinitelyTyped repository.
The official compiler, `tsc`, is a Node.js application that can be integrated into build pipelines using tools like webpack, Rollup, or Vite. Excellent editor support is a hallmark, with deep integration in Microsoft's Visual Studio Code, which is itself written using the language. The ecosystem is supported by a vast repository of type definitions on DefinitelyTyped, which enables type checking for plain JavaScript libraries. Linting and code formatting are commonly handled by ESLint and Prettier with specific plugins. Major build and test systems, including Babel, Jest, and Parcel, have first-class support. The language service, which powers editor features, is also available as a standalone API for building custom tooling.
Category:Programming languages Category:Microsoft development tools Category:JavaScript programming language family Category:Free software programmed in TypeScript