{"_id":"tslib@2.9.1","bugs":{"url":"https://github.com/Microsoft/TypeScript/issues"},"dist":{"shasum":"8986213ba2f17f38ba39a7c43d0e565a9134ff5f","tarball":"http://registry-npm.ywwl.com/tslib/download/tslib-2.9.1.tgz","fileCount":14,"integrity":"sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==","signatures":[{"sig":"MEYCIQCu3wzEkNMYMnHmFE7MX0Bt6f0/QIrbxrQEafUWSNvwGAIhALd87R7AZF9YZEeN9X8lfnIjcwzYh9Pm1ercKJ95jrcL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE618G7765E+CDQs5y1cIDqYfgzheIXsPdJLK8l+52IUAiEAo2PgnkRNMeM/t2t6cLGW132FcHi7L9Pw65ETPCar1kg="}],"unpackedSize":92088,"size":19229,"noattachment":false,"key":"/tslib/-/tslib-2.9.1.tgz"},"main":"tslib.js","name":"tslib","_from":"file:M:\\SvcFab\\_App\\MS.Ess.PackageManager.PublisherV2_App60\\temp\\3edfa981-a5ce-4e81-99cf-44d567f5c585\\tslib-2.9.1.tgz","author":{"name":"Microsoft Corp."},"module":"tslib.es6.js","exports":{".":{"import":{"node":"./modules/index.js","default":{"types":"./modules/index.d.ts","default":"./tslib.es6.mjs"}},"module":{"types":"./modules/index.d.ts","default":"./tslib.es6.mjs"},"default":"./tslib.js"},"./":"./","./*":"./*"},"license":"0BSD","typings":"tslib.d.ts","version":"2.9.1","_npmUser":{"name":"microsoft1es","email":"npmjs@microsoft.com"},"homepage":"https://www.typescriptlang.org/","keywords":["TypeScript","Microsoft","compiler","language","javascript","tslib","runtime"],"_resolved":"M:\\SvcFab\\_App\\MS.Ess.PackageManager.PublisherV2_App60\\temp\\3edfa981-a5ce-4e81-99cf-44d567f5c585\\tslib-2.9.1.tgz","_integrity":"sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==","repository":{"url":"git+https://github.com/Microsoft/tslib.git","type":"git"},"description":"Runtime library for TypeScript helper functions","directories":{},"jsnext:main":"tslib.es6.js","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"typescript-bot","email":"typescript@microsoft.com"},{"name":"weswigham","email":"wwigham@gmail.com"},{"name":"andrewbranch","email":"andrew@wheream.io"},{"name":"typescript-deploys","email":"typescript-design@microsoft.com"},{"name":"microsoft-oss-releases","email":"microsoft-oss-publishing@microsoft.com"},{"name":"jakebailey","email":"jacob.b.bailey@gmail.com"}],"sideEffects":false,"_nodeVersion":"18.5.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tslib_2.9.1_1793391628669_0.759165459320836"},"readme":"# tslib\r\n\r\nThis is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions.\r\n\r\nThis library is primarily used by the `--importHelpers` flag in TypeScript.\r\nWhen using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:\r\n\r\n```ts\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n    for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n        s = arguments[i];\r\n        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n            t[p] = s[p];\r\n    }\r\n    return t;\r\n};\r\nexports.x = {};\r\nexports.y = __assign({}, exports.x);\r\n\r\n```\r\n\r\nwill instead be emitted as something like the following:\r\n\r\n```ts\r\nvar tslib_1 = require(\"tslib\");\r\nexports.x = {};\r\nexports.y = tslib_1.__assign({}, exports.x);\r\n```\r\n\r\nBecause this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.\r\nFor optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.\r\n\r\n# Installing\r\n\r\nFor the latest stable version, run:\r\n\r\n## npm\r\n\r\n```sh\r\n# TypeScript 3.9.2 or later\r\nnpm install tslib\r\n\r\n# TypeScript 3.8.4 or earlier\r\nnpm install tslib@^1\r\n\r\n# TypeScript 2.3.2 or earlier\r\nnpm install tslib@1.6.1\r\n```\r\n\r\n## yarn\r\n\r\n```sh\r\n# TypeScript 3.9.2 or later\r\nyarn add tslib\r\n\r\n# TypeScript 3.8.4 or earlier\r\nyarn add tslib@^1\r\n\r\n# TypeScript 2.3.2 or earlier\r\nyarn add tslib@1.6.1\r\n```\r\n\r\n## bower\r\n\r\n```sh\r\n# TypeScript 3.9.2 or later\r\nbower install tslib\r\n\r\n# TypeScript 3.8.4 or earlier\r\nbower install tslib@^1\r\n\r\n# TypeScript 2.3.2 or earlier\r\nbower install tslib@1.6.1\r\n```\r\n\r\n## JSPM\r\n\r\n```sh\r\n# TypeScript 3.9.2 or later\r\njspm install tslib\r\n\r\n# TypeScript 3.8.4 or earlier\r\njspm install tslib@^1\r\n\r\n# TypeScript 2.3.2 or earlier\r\njspm install tslib@1.6.1\r\n```\r\n\r\n# Usage\r\n\r\nSet the `importHelpers` compiler option on the command line:\r\n\r\n```\r\ntsc --importHelpers file.ts\r\n```\r\n\r\nor in your tsconfig.json:\r\n\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"importHelpers\": true\r\n    }\r\n}\r\n```\r\n\r\n#### For bower and JSPM users\r\n\r\nYou will need to add a `paths` mapping for `tslib`, e.g. For Bower users:\r\n\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"module\": \"amd\",\r\n        \"importHelpers\": true,\r\n        \"baseUrl\": \"./\",\r\n        \"paths\": {\r\n            \"tslib\" : [\"bower_components/tslib/tslib.d.ts\"]\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nFor JSPM users:\r\n\r\n```json\r\n{\r\n    \"compilerOptions\": {\r\n        \"module\": \"system\",\r\n        \"importHelpers\": true,\r\n        \"baseUrl\": \"./\",\r\n        \"paths\": {\r\n            \"tslib\" : [\"jspm_packages/npm/tslib@2.x.y/tslib.d.ts\"]\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n## Deployment\r\n\r\n- Run the **Bump tslib** GitHub workflow and choose patch, minor, or major\r\n- Review and squash-merge the generated version-bump PR\r\n- The release runs automatically: tag, build, publish to npm, and create a GitHub release with generated notes\r\n\r\n# Contribute\r\n\r\nThere are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.\r\n\r\n* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.\r\n* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).\r\n* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).\r\n* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.\r\n* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).\r\n\r\n# Documentation\r\n\r\n* [Quick tutorial](http://www.typescriptlang.org/Tutorial)\r\n* [Programming handbook](http://www.typescriptlang.org/Handbook)\r\n* [Homepage](http://www.typescriptlang.org/)\r\n","publish_time":1793391628741,"_cnpm_publish_time":1793391628741,"dist-tags":{"latest":"2.9.1"}}