Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 9, 2024 via pnpm

tslib 1.14.1

Runtime library for TypeScript helper functions
Package summary
Share
0
issues
1
license
1
0BSD
Package created
30 Dec 2014
Version published
9 Oct 2020
Maintainers
8
Total deps
1
Direct deps
0
License
0BSD

Issues

0
This package has no issues

Licenses

BSD Zero Clause License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
include-copyright
include-license
include-original
Cannot
hold-liable
Must
1 Packages, Including:
tslib@1.14.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of tslib 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does tslib do?

The tslib is a runtime library for TypeScript that contains all the TypeScript helper functions. It is primarily used by the --importHelpers flag in TypeScript. When used, modules that leverage helper functions like __extends and __assign will not repeat the declaration of these functions in the emitted file. Instead, these will be replaced with a call to the tslib equivalents. This leads to smaller file sizes and less runtime overhead which makes for optimized bundles with TypeScript, offering an improved development experience.

How do you use tslib?

To use tslib in a TypeScript project, you first need to install the package using npm or yarn. Here is the installation code for different TypeScript versions:

# TypeScript 3.9.2 or later
npm install tslib
# TypeScript 3.8.4 or earlier
npm install tslib@^1
# TypeScript 2.3.2 or earlier
npm install tslib@1.6.1

You can also use yarn for installation.

Once the tslib is installed, you need to enable the importHelpers option in the TypeScript compiler. This can be done on the command line while running tsc:

tsc --importHelpers file.ts

Or it can be enabled in the compilerOptions attribute in tsconfig.json:

{
    "compilerOptions": {
        "importHelpers": true
    }
}

If you use Bower or JSPM, you'll also need to add a paths mapping for tslib in your tsconfig.json.

Where are the tslib docs?

The documentation for tslib is located within the TypeScript's website. A quick tutorial and programming handbook are available to get acquainted with TypeScript, and by extension, its runtime library, tslib. Additionally, for contributions, bug fixes and to monitor newly implemented fixes, you can visit TypeScript's Github page.