microsoft/TypeScript
TypeScript
TypeScript is a language that extends standard syntax by adding a static type system. It identifies potential runtime errors by analyzing the behaviors and capabilities of values during the compilation process. The language supports object-oriented structures, including classes with inheritance and member visibility control, as well as flexible function definitions that utilize generics, overloads, and parameter destructuring.
The project provides a compiler that manages the build lifecycle through a command-line interface, offering configurable options for module resolution, code generation, and file watching. It includes a suite of utility types for transforming object structures, such as picking, omitting, or modifying property requirements. Developers can organize code using various module standards, including support for both legacy and modern formats.
Comprehensive documentation is available to support the development process, ranging from a detailed handbook and syntax cheat sheets to specific guides for authoring declaration files. These resources assist in integrating type checking into existing codebases and provide guidance on modeling modules for interoperability.
Features
- Conditional Types - Type-level decision making that selects between two possible types based on whether a type satisfies a given constraint.
- Partial Type Construction - A utility type that constructs a new type with all properties of the original type set to optional.
- Abstract Classes - Base classes that require implementation of specific members and prevent direct instantiation of the base class itself.
- Declaration Files - Guidelines for understanding library structures and authoring appropriate type-definition files based on the underlying library format.
- Build Management Utilities - Tools for managing incremental builds, cleaning output directories, performing dry runs, and enabling verbose compilation logging.