TypeScript Runtime Helper Library

JSON →
library 2.8.1 ·javascript
verified May 27, 2026

tslib is a compact runtime library provided by Microsoft that contains all the essential helper functions emitted by the TypeScript compiler. It is primarily used in conjunction with the `--importHelpers` compiler option, which instructs TypeScript to import these common helper functions (such as `__extends`, `__assign`, `__decorate`, `__awaiter`) from `tslib` rather than embedding them directly in every compiled output file. This approach leads to significantly smaller JavaScript bundles and reduced runtime overhead by avoiding redundant function declarations. The current stable version is 2.8.1, with frequent patch and minor releases aligning with TypeScript's development. It differentiates itself by being the official, highly optimized runtime solution for TypeScript's emitted code, ensuring maximum compatibility and efficiency for projects compiled with TypeScript.

total hits 42
actors 9 distinct systems
last hit 18h ago PerplexityBot
GPTBot
5
Amazonbot
5
MetaBot
4
Script
1
ByteDance
1
PerplexityBot
1
Search engines
1
Humans
2

top countries 🇨🇦 Canada · 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · 🇫🇮 Finland