# tslib
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because 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.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 2.3.3 or later
npm install tslib
# TypeScript 2.3.2 or earlier
npm install tslib@1.6.1
```
## yarn
```sh
# TypeScript 2.3.3 or later
yarn add tslib
# TypeScript 2.3.2 or earlier
yarn add tslib@1.6.1
```
## bower
```sh
# TypeScript 2.3.3 or later
bower install tslib
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 2.3.3 or later
jspm install tslib
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
}
}
}
```
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Homepage](http://www.typescriptlang.org/)
没有合适的资源?快使用搜索试试~ 我知道了~
arcgis api for javascript v4.23
共2000个文件
json:10424个
js:5171个
png:386个
需积分: 50 10 下载量 132 浏览量
2022-06-26
00:10:22
上传
评论
收藏 24.04MB 7Z 举报
温馨提示
arcgis api for javascript v4.23
资源详情
资源评论
资源推荐
收起资源包目录
arcgis api for javascript v4.23 (2000个子文件)
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 326KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
main.css 325KB
view.css 310KB
view.css 310KB
complete.css 59KB
style.css 15KB
complete.css 14KB
calcite_core_colors.css 13KB
calcite_core_colors_dark.css 13KB
complete.css 12KB
complete.css 12KB
style.css 12KB
fonts.css 11KB
fonts.css 11KB
fonts.css 10KB
fonts.css 10KB
brand_colors.css 7KB
calcite_vibrant_colors.css 6KB
calcite_vibrant_colors_dark.css 5KB
calcite_highlight_colors.css 4KB
calcite_highlight_colors_dark.css 3KB
calcite_gray_colors.css 3KB
calcite_gray_colors_dark.css 3KB
calcite_core_colors_dark.css 3KB
calcite_core_colors.css 3KB
calcite_core_colors_dark.css 3KB
calcite_core_colors.css 3KB
calcite_core_colors_dark.css 3KB
calcite_core_colors.css 3KB
demo.css 2KB
demo.css 2KB
calcite_vibrant_colors_dark.css 1KB
calcite_vibrant_colors.css 1KB
brand_colors.css 1KB
calcite_vibrant_colors.css 1KB
calcite_vibrant_colors.css 1KB
calcite_vibrant_colors_dark.css 1KB
calcite_vibrant_colors_dark.css 1KB
brand_colors.css 1KB
brand_colors.css 1KB
calcite_highlight_colors_dark.css 980B
calcite_highlight_colors.css 975B
calcite_gray_colors_dark.css 828B
calcite_gray_colors.css 823B
calcite_highlight_colors_dark.css 791B
calcite_highlight_colors.css 791B
calcite_highlight_colors_dark.css 791B
calcite_highlight_colors.css 791B
calcite_gray_colors.css 644B
calcite_gray_colors_dark.css 644B
calcite_gray_colors_dark.css 644B
calcite_gray_colors.css 644B
view.css 33B
main.css 33B
main.css 33B
view.css 33B
install.html 485KB
index.html 3KB
SceneView.js 3.52MB
init.js 1.24MB
editingTools.js 1.05MB
mapViewDeps.js 978KB
index.js 963KB
index.js 956KB
Pipeline.js 928KB
SceneView.js 819KB
Editor.js 727KB
geometryEngineBase.js 618KB
geometryEngineBase.js 612KB
46fa59c267090776d1b9.js 611KB
Sketch.js 593KB
MapView.js 527KB
init.js 451KB
FeatureServiceSnappingSourceWorker.js 405KB
40d7eae1fc395bd0c509.js 367KB
validationUtilsAjv.js 361KB
ImageryTileLayer.js 355KB
arcadeUtils.js 346KB
WFSSourceWorker.js 334KB
ImageryLayer.js 331KB
CSVSourceWorker.js 322KB
GeoJSONSourceWorker.js 321KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
程序员修炼之路
- 粉丝: 12
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0