# microsoft/tslib

Runtime library for TypeScript helpers.

Repository: https://github.com/microsoft/tslib
Canonical: https://ross.abutalabs.com/products/tslib
Language: TypeScript
License: 0BSD
License Family: permissive
Topics: typescript, typescript-helpers, import, bundle, optimize, dependency
Last push: 2026-06-30T07:38:37+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 40, longevity 100
- inputs: {"age_days": 4151, "days_push": 64, "days_rel": 671, "gap_med": 16, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1343, forks 146 (observed 2026-08-28T04:04:26.456695+00:00)

## What it is
tslib is a runtime library containing all of TypeScript's emitted helper functions like __extends and __assign. It is used with the --importHelpers compiler flag to deduplicate helpers across modules, producing smaller bundles with less runtime overhead.

## Use cases
- reduce bundle size in TypeScript projects
- avoid duplicate helper function declarations in compiled output
- optimize emitted JavaScript from the TypeScript compiler
- share TypeScript runtime helpers across modules
- speed up TypeScript application runtime

## When to choose
- you compile TypeScript with importHelpers enabled and want smaller output
- you maintain a library that emits helper calls and want a shared runtime dependency
- you are optimizing bundle size for a large TypeScript codebase

## When to avoid
- your project is plain JavaScript with no TypeScript compilation
- you cannot add runtime dependencies to a zero-dependency library
- your toolchain already inlines or deduplicates TypeScript helpers

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools, build-tool
- domain: developer-tools, web-development, programming-languages
- platform: browser, cross-platform
- tags: typescript, compiler-helpers, runtime-library, bundle-optimization, javascript, nodejs

## Member repositories
- microsoft/tslib (main) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:26.456695+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:43:00.709032+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/tslib (fetched 2026-08-28T04:04:26.456695+00:00, sha 5a90f60e7663)
  - registry_npm: https://registry.npmjs.org/tslib (fetched 2026-08-29T12:02:37.785158+00:00, sha 95bad7276eb8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
