mirror of
https://github.com/gnu4cn/ts-learnings.git
synced 2024-12-26 12:50:31 +08:00
Updated.
This commit is contained in:
parent
a4625f5038
commit
233d4feac0
151
package-lock.json
generated
151
package-lock.json
generated
@ -35,6 +35,12 @@
|
||||
"through2": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "12.11.7",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/@types/node/-/node-12.11.7.tgz",
|
||||
"integrity": "sha512-JNbGaHFCLwgHn/iCckiGSOZ1XYHsKFwREtzPwSGCVld1SGhOlmZw2D4ZI94HQCrBHbADzW9m4LER/8olJTRGHA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/reflect-metadata": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "http://registry.npm.taobao.org/@types/reflect-metadata/download/@types/reflect-metadata-0.1.0.tgz",
|
||||
@ -44,6 +50,15 @@
|
||||
"reflect-metadata": "*"
|
||||
}
|
||||
},
|
||||
"@types/uuid": {
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/@types/uuid/-/uuid-3.4.5.tgz",
|
||||
"integrity": "sha512-MNL15wC3EKyw1VLF+RoVO4hJJdk9t/Hlv3rt1OL65Qvuadm4BYo6g9ZJQqoq7X8NBFSsQXgAujWciovh2lpVjA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz",
|
||||
@ -71,7 +86,7 @@
|
||||
},
|
||||
"ansi-gray": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/ansi-gray/-/ansi-gray-0.1.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/ansi-gray/download/ansi-gray-0.1.1.tgz",
|
||||
"integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -80,7 +95,7 @@
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"dev": true
|
||||
},
|
||||
@ -126,7 +141,7 @@
|
||||
},
|
||||
"archy": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/archy/-/archy-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz",
|
||||
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
|
||||
"dev": true
|
||||
},
|
||||
@ -138,7 +153,7 @@
|
||||
},
|
||||
"arr-filter": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/arr-filter/-/arr-filter-1.1.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/arr-filter/download/arr-filter-1.1.2.tgz",
|
||||
"integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -153,7 +168,7 @@
|
||||
},
|
||||
"arr-map": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/arr-map/-/arr-map-2.0.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/arr-map/download/arr-map-2.0.2.tgz",
|
||||
"integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -174,7 +189,7 @@
|
||||
},
|
||||
"array-initial": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/array-initial/-/array-initial-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/array-initial/download/array-initial-1.1.0.tgz",
|
||||
"integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -264,7 +279,7 @@
|
||||
},
|
||||
"async-settle": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/async-settle/-/async-settle-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/async-settle/download/async-settle-1.0.0.tgz",
|
||||
"integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -279,7 +294,7 @@
|
||||
},
|
||||
"bach": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/bach/-/bach-1.2.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/bach/download/bach-1.2.0.tgz",
|
||||
"integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -452,7 +467,7 @@
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/camelcase/-/camelcase-3.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-3.0.0.tgz",
|
||||
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
|
||||
"dev": true
|
||||
},
|
||||
@ -509,7 +524,7 @@
|
||||
},
|
||||
"cliui": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/cliui/-/cliui-3.2.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz",
|
||||
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -557,13 +572,13 @@
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"dev": true
|
||||
},
|
||||
"collection-map": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/collection-map/-/collection-map-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/collection-map/download/collection-map-1.0.0.tgz",
|
||||
"integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -745,7 +760,7 @@
|
||||
},
|
||||
"decamelize": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
||||
"dev": true
|
||||
},
|
||||
@ -774,7 +789,7 @@
|
||||
},
|
||||
"default-resolution": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/default-resolution/-/default-resolution-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/default-resolution/download/default-resolution-2.0.0.tgz",
|
||||
"integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=",
|
||||
"dev": true
|
||||
},
|
||||
@ -842,7 +857,7 @@
|
||||
},
|
||||
"detect-file": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/detect-file/-/detect-file-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/detect-file/download/detect-file-1.0.0.tgz",
|
||||
"integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
|
||||
"dev": true
|
||||
},
|
||||
@ -1028,7 +1043,7 @@
|
||||
},
|
||||
"expand-tilde": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/expand-tilde/download/expand-tilde-2.0.2.tgz",
|
||||
"integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -1188,7 +1203,7 @@
|
||||
},
|
||||
"find-up": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/find-up/-/find-up-1.1.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz",
|
||||
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -1245,7 +1260,7 @@
|
||||
},
|
||||
"for-own": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/for-own/-/for-own-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/for-own/download/for-own-1.0.0.tgz",
|
||||
"integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -1935,7 +1950,7 @@
|
||||
},
|
||||
"global-prefix": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/global-prefix/download/global-prefix-1.0.2.tgz",
|
||||
"integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2222,7 +2237,7 @@
|
||||
},
|
||||
"invert-kv": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/invert-kv/-/invert-kv-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz",
|
||||
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
|
||||
"dev": true
|
||||
},
|
||||
@ -2258,7 +2273,7 @@
|
||||
},
|
||||
"is-arrayish": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz",
|
||||
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||
"dev": true
|
||||
},
|
||||
@ -2330,7 +2345,7 @@
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2437,7 +2452,7 @@
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/isexe/-/isexe-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||
"dev": true
|
||||
},
|
||||
@ -2455,7 +2470,7 @@
|
||||
},
|
||||
"just-debounce": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/just-debounce/-/just-debounce-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/just-debounce/download/just-debounce-1.0.0.tgz",
|
||||
"integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=",
|
||||
"dev": true
|
||||
},
|
||||
@ -2467,7 +2482,7 @@
|
||||
},
|
||||
"last-run": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/last-run/-/last-run-1.1.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/last-run/download/last-run-1.1.1.tgz",
|
||||
"integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2486,7 +2501,7 @@
|
||||
},
|
||||
"lcid": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/lcid/-/lcid-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz",
|
||||
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2549,7 +2564,7 @@
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/load-json-file/-/load-json-file-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz",
|
||||
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2616,7 +2631,7 @@
|
||||
},
|
||||
"matchdep": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/matchdep/-/matchdep-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/matchdep/download/matchdep-2.0.0.tgz",
|
||||
"integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2628,7 +2643,7 @@
|
||||
"dependencies": {
|
||||
"findup-sync": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/findup-sync/-/findup-sync-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/findup-sync/download/findup-sync-2.0.0.tgz",
|
||||
"integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2640,7 +2655,7 @@
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/is-glob/-/is-glob-3.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz",
|
||||
"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2832,7 +2847,7 @@
|
||||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"dev": true
|
||||
},
|
||||
@ -2902,7 +2917,7 @@
|
||||
},
|
||||
"object.defaults": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/object.defaults/download/object.defaults-1.1.0.tgz",
|
||||
"integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2914,7 +2929,7 @@
|
||||
},
|
||||
"object.map": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/object.map/-/object.map-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/object.map/download/object.map-1.0.1.tgz",
|
||||
"integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2933,7 +2948,7 @@
|
||||
},
|
||||
"object.reduce": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/object.reduce/-/object.reduce-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/object.reduce/download/object.reduce-1.0.1.tgz",
|
||||
"integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2985,7 +3000,7 @@
|
||||
},
|
||||
"os-locale": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/os-locale/-/os-locale-1.4.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz",
|
||||
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -2994,7 +3009,7 @@
|
||||
},
|
||||
"parse-filepath": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/parse-filepath/download/parse-filepath-1.0.2.tgz",
|
||||
"integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3005,7 +3020,7 @@
|
||||
},
|
||||
"parse-json": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/parse-json/-/parse-json-2.2.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz",
|
||||
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3020,7 +3035,7 @@
|
||||
},
|
||||
"parse-passwd": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/parse-passwd/download/parse-passwd-1.0.0.tgz",
|
||||
"integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3044,7 +3059,7 @@
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/path-exists/-/path-exists-2.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz",
|
||||
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3065,7 +3080,7 @@
|
||||
},
|
||||
"path-root": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/path-root/-/path-root-0.1.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/path-root/download/path-root-0.1.1.tgz",
|
||||
"integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3074,13 +3089,13 @@
|
||||
},
|
||||
"path-root-regex": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/path-root-regex/download/path-root-regex-0.1.2.tgz",
|
||||
"integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
|
||||
"dev": true
|
||||
},
|
||||
"path-type": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/path-type/-/path-type-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/path-type/download/path-type-1.1.0.tgz",
|
||||
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3100,19 +3115,19 @@
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
},
|
||||
"pinkie": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/pinkie/-/pinkie-2.0.4.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz",
|
||||
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
|
||||
"dev": true
|
||||
},
|
||||
"pinkie-promise": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz",
|
||||
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3139,7 +3154,7 @@
|
||||
},
|
||||
"pretty-hrtime": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz",
|
||||
"integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3184,7 +3199,7 @@
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/read-pkg/-/read-pkg-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz",
|
||||
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3195,7 +3210,7 @@
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-1.0.1.tgz",
|
||||
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3239,7 +3254,7 @@
|
||||
},
|
||||
"rechoir": {
|
||||
"version": "0.6.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/rechoir/-/rechoir-0.6.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz",
|
||||
"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3309,7 +3324,7 @@
|
||||
},
|
||||
"replace-homedir": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/replace-homedir/-/replace-homedir-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/replace-homedir/download/replace-homedir-1.0.0.tgz",
|
||||
"integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3320,13 +3335,13 @@
|
||||
},
|
||||
"require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
||||
"dev": true
|
||||
},
|
||||
"require-main-filename": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/require-main-filename/-/require-main-filename-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz",
|
||||
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3341,7 +3356,7 @@
|
||||
},
|
||||
"resolve-dir": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/resolve-dir/download/resolve-dir-1.0.1.tgz",
|
||||
"integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3393,7 +3408,7 @@
|
||||
},
|
||||
"semver-greatest-satisfied-range": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/semver-greatest-satisfied-range/download/semver-greatest-satisfied-range-1.1.0.tgz",
|
||||
"integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3446,7 +3461,7 @@
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3669,7 +3684,7 @@
|
||||
},
|
||||
"stack-trace": {
|
||||
"version": "0.0.10",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/stack-trace/-/stack-trace-0.0.10.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/stack-trace/download/stack-trace-0.0.10.tgz",
|
||||
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3723,7 +3738,7 @@
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/string-width/-/string-width-1.0.2.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3743,7 +3758,7 @@
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3752,7 +3767,7 @@
|
||||
},
|
||||
"strip-bom": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/strip-bom/-/strip-bom-2.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/strip-bom/download/strip-bom-2.0.0.tgz",
|
||||
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3767,7 +3782,7 @@
|
||||
},
|
||||
"sver-compat": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/sver-compat/-/sver-compat-1.5.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/sver-compat/download/sver-compat-1.5.0.tgz",
|
||||
"integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -3803,7 +3818,7 @@
|
||||
},
|
||||
"time-stamp": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/time-stamp/-/time-stamp-1.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/time-stamp/download/time-stamp-1.1.0.tgz",
|
||||
"integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3880,7 +3895,7 @@
|
||||
},
|
||||
"typedarray": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3933,7 +3948,7 @@
|
||||
},
|
||||
"undertaker-registry": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/undertaker-registry/download/undertaker-registry-1.0.1.tgz",
|
||||
"integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=",
|
||||
"dev": true
|
||||
},
|
||||
@ -4191,13 +4206,13 @@
|
||||
},
|
||||
"which-module": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/which-module/-/which-module-1.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/which-module/download/which-module-1.0.0.tgz",
|
||||
"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
|
||||
"dev": true
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz",
|
||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -4219,13 +4234,13 @@
|
||||
},
|
||||
"y18n": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/y18n/-/y18n-3.2.1.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/y18n/download/y18n-3.2.1.tgz",
|
||||
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
|
||||
"dev": true
|
||||
},
|
||||
"yargs": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/yargs/-/yargs-7.1.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/yargs/download/yargs-7.1.0.tgz",
|
||||
"integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -4246,7 +4261,7 @@
|
||||
},
|
||||
"yargs-parser": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://mirrors.huaweicloud.com/repository/npm/yargs-parser/-/yargs-parser-5.0.0.tgz",
|
||||
"resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-5.0.0.tgz",
|
||||
"integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -23,6 +23,7 @@
|
||||
"homepage": "https://github.com/gnu4cn/ts-learnings#readme",
|
||||
"devDependencies": {
|
||||
"@types/reflect-metadata": "^0.1.0",
|
||||
"@types/uuid": "^3.4.5",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-sourcemaps": "^2.6.1",
|
||||
"gulp-typescript": "^5.0.1",
|
||||
|
54
src/array.ts
Normal file
54
src/array.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
export interface Person {
|
||||
readonly id: string;
|
||||
name: string;
|
||||
gender: string;
|
||||
[propName: string]: string|number;
|
||||
}
|
||||
|
||||
let user: Person = {
|
||||
id: uuid(),
|
||||
name: "彭海林",
|
||||
gender: 'male',
|
||||
age: 35
|
||||
}
|
||||
|
||||
// 这里必须要对数组初始化,编译后的js才能运行
|
||||
let employees: Array<Person> = [];
|
||||
employees.push(user);
|
||||
|
||||
employees.forEach(p => {console.log(p)});
|
||||
|
||||
console.log(employees);
|
||||
console.log(typeof(employees));
|
||||
|
||||
interface Persons {
|
||||
[index: number]: Person;
|
||||
}
|
||||
|
||||
let employers: Persons = [user];
|
||||
console.log(employers);
|
||||
console.log(typeof(employers));
|
||||
|
||||
function sum() {
|
||||
let args: IArguments = arguments;
|
||||
}
|
||||
|
||||
let b: Boolean = new Boolean(1);
|
||||
console.log(b, b.valueOf());
|
||||
|
||||
let e: Error = new Error("发生了错误。");
|
||||
console.log(typeof(e), e.message, e.name)
|
||||
|
||||
let d: Date = new Date();
|
||||
console.log(d, typeof(d), d.toLocaleString());
|
||||
|
||||
let r: RegExp = /[a-z][A-Z]/
|
||||
console.log(r, typeof(r), r.test("This is a test"));
|
||||
|
||||
console.log(Math.pow(10, 2));
|
||||
console.log(Math.E, Math.PI)
|
||||
|
||||
let anyArray: Array<any> = [5, 'Peng Hailin', {website: 'https:xfoss.com'}];
|
||||
console.log(anyArray, typeof anyArray);
|
99
src/class.ts
Normal file
99
src/class.ts
Normal file
@ -0,0 +1,99 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
abstract class Thing {
|
||||
protected id: string;
|
||||
public constructor(protected name: string) {
|
||||
this.name = name;
|
||||
this.id = uuid();
|
||||
}
|
||||
|
||||
getName() {
|
||||
return this.name;
|
||||
}
|
||||
setName(name: string) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public abstract sayHi(): string;
|
||||
}
|
||||
|
||||
class Animal extends Thing {
|
||||
sayHi() {
|
||||
return `Hi, I am ${this.name}, ${this.id} is my ID number.`;
|
||||
}
|
||||
}
|
||||
|
||||
let cat = new Animal('Tom');
|
||||
console.log(cat.sayHi());
|
||||
|
||||
|
||||
interface Alarm {
|
||||
alert(): void;
|
||||
}
|
||||
|
||||
interface Light {
|
||||
lightOn(): void;
|
||||
lightOff(): void;
|
||||
}
|
||||
|
||||
interface LightableAlarm extends Alarm {
|
||||
lightOn(): void;
|
||||
lightOff(): void;
|
||||
}
|
||||
|
||||
class Door {
|
||||
}
|
||||
|
||||
class SecurityDoor extends Door implements Alarm {
|
||||
alert() {
|
||||
console.log('SecurityDoor alert...');
|
||||
}
|
||||
}
|
||||
|
||||
class Car implements LightableAlarm {
|
||||
alert() {
|
||||
console.log('Car alert...');
|
||||
}
|
||||
lightOn() {
|
||||
console.log('The light is on.');
|
||||
}
|
||||
lightOff() {
|
||||
console.log('The light is off.');
|
||||
}
|
||||
}
|
||||
|
||||
let door = new SecurityDoor();
|
||||
console.log(door);
|
||||
door.alert();
|
||||
|
||||
let car = new Car();
|
||||
console.log(car);
|
||||
car.alert();
|
||||
car.lightOn();
|
||||
car.lightOff();
|
||||
|
||||
class Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
interface Point3D extends Point {
|
||||
z: number;
|
||||
calc(): string;
|
||||
}
|
||||
|
||||
class RealPoint implements Point3D {
|
||||
public constructor(public x: number, public y: number, public z: number) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
calc() {
|
||||
let distance = Math.sqrt(Math.pow(this.x, 2) + Math.pow(this.y, 2) + Math.pow(this.z, 2));
|
||||
return Math.round(distance).toString();
|
||||
}
|
||||
}
|
||||
|
||||
let pointA = new RealPoint(123, -19980, 10234);
|
||||
|
||||
console.log(pointA, pointA.calc());
|
14
src/enum.ts
Normal file
14
src/enum.ts
Normal file
@ -0,0 +1,14 @@
|
||||
enum Days {周日 = 7, 周一 = 1, 周二, 周三, 周四, 周五, 周六 = "周六".length}
|
||||
|
||||
console.log(Days[2], Days["周二"])
|
||||
|
||||
const enum Directions {
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
|
||||
let directions = [Directions.Up, Directions.Down, Directions.Left, Directions.Right]
|
||||
|
||||
console.log(directions)
|
17
src/interface.ts
Normal file
17
src/interface.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
interface Person {
|
||||
readonly id: string;
|
||||
name: string;
|
||||
gender: string;
|
||||
[propName: string]: string|number;
|
||||
}
|
||||
|
||||
let user: Person = {
|
||||
id: uuid(),
|
||||
name: "彭海林",
|
||||
gender: 'male',
|
||||
age: 35
|
||||
}
|
||||
|
||||
console.log(user.id);
|
@ -1,2 +1,2 @@
|
||||
let a: Symbol = Symbol('one');
|
||||
let a: Symbol;
|
||||
console.log(a);
|
||||
|
2
src/tuple.ts
Normal file
2
src/tuple.ts
Normal file
@ -0,0 +1,2 @@
|
||||
let x: [string, number];
|
||||
x[0] = 'John';
|
13
src/type-alias.ts
Normal file
13
src/type-alias.ts
Normal file
@ -0,0 +1,13 @@
|
||||
type Name = string;
|
||||
type NameResolver = () => string;
|
||||
type NameOrResolver = Name | NameResolver;
|
||||
|
||||
function getName(n: NameOrResolver): Name {
|
||||
if ( typeof n === 'string' ) {
|
||||
return n;
|
||||
} else {
|
||||
return n();
|
||||
}
|
||||
}
|
||||
|
||||
console.log(getName('Peng Hailin'));
|
7
src/type-literals.ts
Normal file
7
src/type-literals.ts
Normal file
@ -0,0 +1,7 @@
|
||||
type EventNames = 'click' | 'scroll' | 'mousemove';
|
||||
function handleEvent(ele: Element, event: EventNames) {
|
||||
// do something
|
||||
}
|
||||
|
||||
handleEvent(document.getElementById('hello'), 'scroll');
|
||||
handleEvent(document.getElementById('hello'), 'mousemove');
|
Loading…
Reference in New Issue
Block a user