Back to Explore

microsoft/tslib

GitHub
1 watchersOpen source

Last release: 10/31/2024

tslib is a runtime library that provides TypeScript helper functions. It is primarily used with the TypeScript `--importHelpers` compiler option so emitted code can import shared helpers like `__extends` and `__assign`, which can reduce duplicate declarations and help produce smaller bundles with less runtime overhead.

Project status

  • The repository (microsoft/tslib) appears actively maintained, with an upstream push as recent as 2026-06-04, and recent tagged updates in 2024 (v2.7.0, v2.8.0, v2.8.1).
  • Apparent update cadence (based on the tagged updates shown): three updates within about two months in 2024 (Aug 23 to Oct 31), and no further tagged updates are listed after v2.8.1 (2024-10-31).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.8.1

    10/31/2024

    v2.8.1 primarily adjusts the TypeScript __importStar helper to include non-enumerable properties via Object.getOwnPropertyNames. It also updates the npm publish GitHub Actions workflow to run tests and uses a newer Node.js version during publishing.

  • v2.8.0

    10/15/2024

    tslib v2.8.0 introduces a new helper, __rewriteRelativeImportExtension, for rewriting relative TypeScript import specifiers to their JavaScript equivalents (with optional JSX mapping). It also updates the library’s entrypoints and tests to validate export structure consistency across the different builds (tslib.js, tslib.es6.js, tslib.es6.mjs, and tslib/modules/index.js).

    Features
  • v2.7.0

    8/23/2024

    tslib v2.7.0 updates the downlevel generator helpers and the using/await using disposal machinery. The release notes mention deterministic handling for `await using` and switching downlevel generators to use the global `Iterator.prototype`, but the code diff shows additional internal behavior changes.

    Features
  • v2.6.3

    6/4/2024

    tslib v2.6.3 contains a small runtime update intended to align behavior around async disposal (the release notes mention 'await using' normative changes). The diff also shows internal helper logic changes that affect how async generators handle 'return' and how disposable resources behave when only Symbol.dispose is present. Release notes do not describe these internal behavioral adjustments in detail.

  • v2.6.2

    8/18/2023

    tslib v2.6.2 updates the package.json exports metadata. The main change is a fix to the path for the `exports['module'].types` entry so TypeScript can correctly resolve type declarations.

  • v2.6.1

    7/24/2023

    tslib v2.6.1 includes a small behavioral change to __addDisposableResource, allowing function values in addition to objects. It also adjusts the tslib.es6.js default export to avoid ES6 object literal shorthand syntax, likely improving compatibility for older tooling.

    Features
  • 2.6.0

    6/26/2023

    tslib 2.6.0 adds new internal runtime helpers used to implement TypeScript's `using` and `await using` semantics. The release notes only mention the addition of these helpers, while the code diff shows the exact runtime behavior, including disposal symbol checks and suppressed-error handling.

    Features
  • v2.5.3

    6/2/2023

    tslib 2.5.3 changes the package.json export targets for ESM consumers, removing references to the legacy tslib.es6.js path. The release notes only mention the removal, but the code diff shows a broader export and type-resolution update.

    Breaking
  • 2.5.2

    5/18/2023

    tslib 2.5.2 updates its type surface to re-export TypeScript helper functions explicitly. The release notes describe this as a workaround for TypeScript's incomplete symbol resolution.

  • 2.5.1

    5/17/2023

    tslib 2.5.1 includes two documented fixes: it reverses the order of decorator-provided `init` hooks, and it updates the package `exports` plus type declarations to work correctly with `moduleResolution` set to `node16` and `bundler`. The code diff also shows additional module entry changes beyond what the release notes explicitly call out, mainly around adding a default export surface.